#include <export_data_internal.hpp>
Public Member Functions | |
virtual ExportDataInternal * | clone () const =0 |
Make a deep copy of the instance. | |
virtual returnValue | exportDataDeclaration (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const =0 |
ExportDataInternal (const std::string &_name=std::string(), ExportType _type=REAL, ExportStruct _dataStruct=ACADO_LOCAL, const std::string &_prefix=std::string()) | |
ExportStruct | getDataStruct () const |
std::string | getDataStructString () const |
virtual std::string | getDoc () const |
std::string | getFullName () const |
std::string | getName () const |
std::string | getPrefix () const |
ExportType | getType () const |
std::string | getTypeString (const std::string &_realString="real_t", const std::string &_intString="int") const |
virtual bool | isGiven () const =0 |
returnValue | setDataStruct (ExportStruct _dataStruct) |
virtual returnValue | setDoc (const std::string &_doc) |
returnValue | setName (const std::string &_name) |
returnValue | setPrefix (const std::string &_prefix) |
returnValue | setType (ExportType _type) |
virtual | ~ExportDataInternal () |
Protected Member Functions | |
returnValue | setFullName (void) |
Protected Attributes | |
ExportStruct | dataStruct |
std::string | description |
std::string | fullName |
std::string | name |
std::string | prefix |
ExportType | type |
Definition at line 33 of file export_data_internal.hpp.
ExportDataInternal::ExportDataInternal | ( | const std::string & | _name = std::string() , |
ExportType | _type = REAL , |
||
ExportStruct | _dataStruct = ACADO_LOCAL , |
||
const std::string & | _prefix = std::string() |
||
) | [explicit] |
Default constructor which optionally takes name and type string of the data object.
[in] | _name | Name of the data object. |
[in] | _type | Data type of the data object. |
[in] | _dataStruct | Global data struct to which the data object belongs to (if any). |
[in] | _prefix | Optional prefix that will be put in front of the name. |
Definition at line 36 of file export_data_internal.cpp.
ExportDataInternal::~ExportDataInternal | ( | ) | [virtual] |
Destructor.
Definition at line 47 of file export_data_internal.cpp.
virtual ExportDataInternal* ExportDataInternal::clone | ( | ) | const [pure virtual] |
Make a deep copy of the instance.
Implements CasADi::SharedObjectNode.
Implemented in ExportVariableInternal, ExportArgumentInternal, and ExportIndexNode.
virtual returnValue ExportDataInternal::exportDataDeclaration | ( | std::ostream & | stream, |
const std::string & | _realString = "real_t" , |
||
const std::string & | _intString = "int" , |
||
int | _precision = 16 |
||
) | const [pure virtual] |
Exports declaration of the index variable. Its appearance can can be adjusted by various options.
[in] | file | Name of file to be used to export function. |
[in] | _realString | std::string to be used to declare real variables. |
[in] | _intString | std::string to be used to declare integer variables. |
[in] | _precision | Number of digits to be used for exporting real values. |
Implemented in ExportArgumentInternal, and ExportIndexNode.
Returns the global data struct to which the data object belongs to.
Definition at line 135 of file export_data_internal.cpp.
std::string ExportDataInternal::getDataStructString | ( | ) | const |
Returns a string containing the global data struct to which the data object belongs to.
Definition at line 141 of file export_data_internal.cpp.
std::string ExportDataInternal::getDoc | ( | ) | const [virtual] |
Definition at line 247 of file export_data_internal.cpp.
std::string ExportDataInternal::getFullName | ( | ) | const |
Returns the full name of the data object including the possible prefix of the global data struct.
Definition at line 189 of file export_data_internal.cpp.
std::string ExportDataInternal::getName | ( | ) | const |
Returns the name of the data object.
Definition at line 97 of file export_data_internal.cpp.
std::string ExportDataInternal::getPrefix | ( | ) | const |
Returns a string which contains a prefix name.
Definition at line 107 of file export_data_internal.cpp.
ExportType ExportDataInternal::getType | ( | ) | const |
Returns the data type of the data object.
Definition at line 102 of file export_data_internal.cpp.
std::string ExportDataInternal::getTypeString | ( | const std::string & | _realString = "real_t" , |
const std::string & | _intString = "int" |
||
) | const |
Returns a string containing the data type of the data object.
[in] | _realString | std::string to be used to declare real variables. |
[in] | _intString | std::string to be used to declare integer variables. |
Definition at line 112 of file export_data_internal.cpp.
virtual bool ExportDataInternal::isGiven | ( | ) | const [pure virtual] |
Returns whether the index is set to a given value.
Implemented in ExportArgumentInternal, ExportVariableInternal, and ExportIndexNode.
returnValue ExportDataInternal::setDataStruct | ( | ExportStruct | _dataStruct | ) |
Sets the global data struct to which the data object belongs to.
[in] | _dataStruct | New global data struct to which the data object belongs to. |
Definition at line 85 of file export_data_internal.cpp.
returnValue ExportDataInternal::setDoc | ( | const std::string & | _doc | ) | [virtual] |
Definition at line 240 of file export_data_internal.cpp.
returnValue ExportDataInternal::setFullName | ( | void | ) | [protected] |
Definition at line 208 of file export_data_internal.cpp.
returnValue ExportDataInternal::setName | ( | const std::string & | _name | ) |
Sets the name of the data object.
[in] | _name | New name of the data object. |
Definition at line 51 of file export_data_internal.cpp.
returnValue ExportDataInternal::setPrefix | ( | const std::string & | _prefix | ) |
Sets the prefix which is placed before the structure name.
[in] | _prefix | Prefix name. |
Definition at line 75 of file export_data_internal.cpp.
Sets the data type of the data object.
[in] | _type | New data type of the data object. |
Definition at line 65 of file export_data_internal.cpp.
ExportStruct ExportDataInternal::dataStruct [protected] |
Global data struct to which the data object belongs to (if any).
Definition at line 186 of file export_data_internal.hpp.
std::string ExportDataInternal::description [protected] |
Description of the variable
Definition at line 192 of file export_data_internal.hpp.
std::string ExportDataInternal::fullName [protected] |
Full name of the data object including the possible prefix of the global data struct.
Definition at line 189 of file export_data_internal.hpp.
std::string ExportDataInternal::name [protected] |
Name of the data object.
Definition at line 177 of file export_data_internal.hpp.
std::string ExportDataInternal::prefix [protected] |
Prefix, which is added before the structure name
Definition at line 183 of file export_data_internal.hpp.
ExportType ExportDataInternal::type [protected] |
Data type of the data object.
Definition at line 180 of file export_data_internal.hpp.