SPHinXsys
alpha version
|
To hold related info about discrete variables. More...
#include <state_engine.h>
Public Member Functions | |
StateVariableInfo (StateEngine::StateVariable *sv, int order) | |
StateVariableInfo (const StateVariableInfo &) | |
StateVariableInfo & | operator= (const StateVariableInfo &svi) |
Public Attributes | |
std::unique_ptr< StateEngine::StateVariable > | statevariable_ |
int | order |
To hold related info about discrete variables.
|
inline |
Need empty copy constructor because default compiler generated will fail since it cannot copy a unique_ptr.
|
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.