![]() |
KIDS
ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
|
Represents a variable token in an expression rule. More...
#include <VariableDescriptor.h>
Public Member Functions | |
VariableDescriptor (const std::string &token_string) | |
Constructs a VariableDescriptor object. | |
void | referIn (std::shared_ptr< DataSet > &DS) |
Associates the variable with data in the DataSet. | |
void | defineIn (std::shared_ptr< DataSet > &DS, kids_dtype data_type, const std::vector< std::size_t > &cxxshape) |
Define variable with data in the DataSet. | |
Private Attributes | |
std::string | tokenString |
The input token string. | |
std::string | name |
The name of the variable. | |
std::string | field |
The field of the variable. | |
std::string | index |
The index of the variable. | |
std::string | type |
The type of the variable. | |
std::string | time |
The time of the variable. | |
kids_dtype | dataType |
The data type of the variable. | |
void * | dataPointer |
Pointer to the data of the variable. | |
Shape * | shape |
Pointer to the shape of the variable. | |
Friends | |
class | RuleEvaluator |
class | RuleSet |
class | Kernel |
Represents a variable token in an expression rule.
Definition at line 40 of file VariableDescriptor.h.
PROJECT_NS::VariableDescriptor::VariableDescriptor | ( | const std::string & | token_string | ) |
Constructs a VariableDescriptor object.
token_string | The input string. |
DS | Shared pointer to the dataset. |
initiallyDefined | Flag indicating if the variable is initially defined (default is true). |
Definition at line 8 of file VariableDescriptor.cpp.
References dataType, field, index, PROJECT_NS::kids_complex_type, PROJECT_NS::kids_real_type, PROJECT_NS::kids_void_type, name, tokenString, and type.
void PROJECT_NS::VariableDescriptor::defineIn | ( | std::shared_ptr< DataSet > & | DS, |
kids_dtype | data_type, | ||
const std::vector< std::size_t > & | cxxshape ) |
Define variable with data in the DataSet.
DS | Shared pointer to the DataSet containing the variable's data. |
Definition at line 56 of file VariableDescriptor.cpp.
References utils::concat(), dataPointer, dataType, field, PROJECT_NS::kids_complex_type, PROJECT_NS::kids_real_type, LOC, name, and shape.
void PROJECT_NS::VariableDescriptor::referIn | ( | std::shared_ptr< DataSet > & | DS | ) |
Associates the variable with data in the DataSet.
DS | Shared pointer to the DataSet containing the variable's data. |
Definition at line 37 of file VariableDescriptor.cpp.
References utils::concat(), dataPointer, dataType, field, index, LOC, name, shape, PROJECT_NS::Shape::to_string(), tokenString, and type.
|
friend |
Definition at line 68 of file VariableDescriptor.h.
|
friend |
Definition at line 66 of file VariableDescriptor.h.
|
friend |
Definition at line 67 of file VariableDescriptor.h.
|
private |
Pointer to the data of the variable.
Definition at line 77 of file VariableDescriptor.h.
Referenced by defineIn(), and referIn().
|
private |
The data type of the variable.
Definition at line 76 of file VariableDescriptor.h.
Referenced by defineIn(), referIn(), and VariableDescriptor().
|
private |
The field of the variable.
Definition at line 72 of file VariableDescriptor.h.
Referenced by defineIn(), referIn(), and VariableDescriptor().
|
private |
The index of the variable.
Definition at line 73 of file VariableDescriptor.h.
Referenced by referIn(), and VariableDescriptor().
|
private |
The name of the variable.
Definition at line 71 of file VariableDescriptor.h.
Referenced by defineIn(), referIn(), and VariableDescriptor().
|
private |
Pointer to the shape of the variable.
Definition at line 78 of file VariableDescriptor.h.
Referenced by defineIn(), and referIn().
|
private |
The time of the variable.
Definition at line 75 of file VariableDescriptor.h.
|
private |
The input token string.
Definition at line 70 of file VariableDescriptor.h.
Referenced by referIn(), and VariableDescriptor().
|
private |
The type of the variable.
Definition at line 74 of file VariableDescriptor.h.
Referenced by referIn(), and VariableDescriptor().