StateVariableArray Class
(CDPSim::StateVariableArray)The StateVariableArray wraps an array of StateVariables. More...
Header: | #include <DynamicSimComponent/StateVariableArray.h> |
Public Functions
StateVariableArray() | |
StateVariableArray(const StateVariableArray &other) = delete | |
~StateVariableArray() | |
void | Create(const char *name, DynamicSimComponent *parent, int size) |
int | Size() const |
StateVariableArray & | operator=(const StateVariableArray &other) = delete |
StateVariable & | operator[](int i) |
Detailed Description
The StateVariableArray wraps an array of StateVariables.
Usage
Create a member in the header file of a DynamicSimComponent inherited class. Can be accessed with notation like: A[4] = 3.0;
and A[4].ddt = 2.0;
.
Features
- Creates an array of StateVariable objects.
- Size is specified as a parameter to Create().
- StateVariables created are registered as children of the DynamicSimComponent.
Member Function Documentation
StateVariableArray::StateVariableArray()
Default constructs an instance of StateVariableArray.
[delete]
StateVariableArray::StateVariableArray(const StateVariableArray &other)
Copy constructor.
StateVariableArray::~StateVariableArray()
Destroys the instance of StateVariableArray.
void StateVariableArray::Create(const char *name, DynamicSimComponent *parent, int size)
Creates the instance, binds it to name and registers to parent.
int StateVariableArray::Size() const
Get number of StateVariables in this array.
[delete]
StateVariableArray &StateVariableArray::operator=(const StateVariableArray &other)
Copy-assignment operator.
StateVariable &StateVariableArray::operator[](int i)
Allows notation like: A[4] = 3.0; and A[4].ddt = 2.0;
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.