SPHinXsys  alpha version
Public Member Functions | Public Attributes | List of all members
SPH::StateEngine::StateVariableInfo Struct Reference

To hold related info about discrete variables. More...

#include <state_engine.h>

Public Member Functions

 StateVariableInfo (StateEngine::StateVariable *sv, int order)
 
 StateVariableInfo (const StateVariableInfo &)
 
StateVariableInfooperator= (const StateVariableInfo &svi)
 

Public Attributes

std::unique_ptr< StateEngine::StateVariablestatevariable_
 
int order
 

Detailed Description

To hold related info about discrete variables.

Constructor & Destructor Documentation

◆ StateVariableInfo()

SPH::StateEngine::StateVariableInfo::StateVariableInfo ( const StateVariableInfo )
inline

Need empty copy constructor because default compiler generated will fail since it cannot copy a unique_ptr.

Member Function Documentation

◆ operator=()

StateVariableInfo& SPH::StateEngine::StateVariableInfo::operator= ( const StateVariableInfo svi)
inline

Now handle assignment by moving ownership of the unique pointer.

assignment has to be const but cannot swap const want to keep unique pointer to guarantee no multiple reference so use const_cast to swap under the covers.


The documentation for this struct was generated from the following file: