KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
PROJECT_NS::VariableDescriptor Struct Reference

Represents a variable token in an expression rule. More...

#include <VariableDescriptor.h>

Collaboration diagram for PROJECT_NS::VariableDescriptor:
Collaboration graph

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.
 
Shapeshape
 Pointer to the shape of the variable.
 

Friends

class RuleEvaluator
 
class RuleSet
 
class Kernel
 

Detailed Description

Represents a variable token in an expression rule.

Definition at line 40 of file VariableDescriptor.h.

Constructor & Destructor Documentation

◆ VariableDescriptor()

PROJECT_NS::VariableDescriptor::VariableDescriptor ( const std::string & token_string)

Constructs a VariableDescriptor object.

Parameters
token_stringThe input string.
DSShared pointer to the dataset.
initiallyDefinedFlag 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.

Member Function Documentation

◆ defineIn()

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.

Parameters
DSShared 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.

Here is the call graph for this function:

◆ referIn()

void PROJECT_NS::VariableDescriptor::referIn ( std::shared_ptr< DataSet > & DS)

Associates the variable with data in the DataSet.

Parameters
DSShared 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.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Kernel

friend class Kernel
friend

Definition at line 68 of file VariableDescriptor.h.

◆ RuleEvaluator

friend class RuleEvaluator
friend

Definition at line 66 of file VariableDescriptor.h.

◆ RuleSet

friend class RuleSet
friend

Definition at line 67 of file VariableDescriptor.h.

Member Data Documentation

◆ dataPointer

void* PROJECT_NS::VariableDescriptor::dataPointer
private

Pointer to the data of the variable.

Definition at line 77 of file VariableDescriptor.h.

Referenced by defineIn(), and referIn().

◆ dataType

kids_dtype PROJECT_NS::VariableDescriptor::dataType
private

The data type of the variable.

Definition at line 76 of file VariableDescriptor.h.

Referenced by defineIn(), referIn(), and VariableDescriptor().

◆ field

std::string PROJECT_NS::VariableDescriptor::field
private

The field of the variable.

Definition at line 72 of file VariableDescriptor.h.

Referenced by defineIn(), referIn(), and VariableDescriptor().

◆ index

std::string PROJECT_NS::VariableDescriptor::index
private

The index of the variable.

Definition at line 73 of file VariableDescriptor.h.

Referenced by referIn(), and VariableDescriptor().

◆ name

std::string PROJECT_NS::VariableDescriptor::name
private

The name of the variable.

Definition at line 71 of file VariableDescriptor.h.

Referenced by defineIn(), referIn(), and VariableDescriptor().

◆ shape

Shape* PROJECT_NS::VariableDescriptor::shape
private

Pointer to the shape of the variable.

Definition at line 78 of file VariableDescriptor.h.

Referenced by defineIn(), and referIn().

◆ time

std::string PROJECT_NS::VariableDescriptor::time
private

The time of the variable.

Definition at line 75 of file VariableDescriptor.h.

◆ tokenString

std::string PROJECT_NS::VariableDescriptor::tokenString
private

The input token string.

Definition at line 70 of file VariableDescriptor.h.

Referenced by referIn(), and VariableDescriptor().

◆ type

std::string PROJECT_NS::VariableDescriptor::type
private

The type of the variable.

Definition at line 74 of file VariableDescriptor.h.

Referenced by referIn(), and VariableDescriptor().


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