Abstract base class to define variables to be used for exporting code. More...
#include <export_data.hpp>
Public Member Functions | |
ExportData () | |
virtual returnValue | exportDataDeclaration (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const |
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 () |
ExportDataInternal * | operator-> () |
const ExportDataInternal * | operator-> () const |
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 | ~ExportData () |
Abstract base class to define variables to be used for exporting code.
The class ExportData serves as an abstract base class to define variables to be used for exporting code.
Definition at line 55 of file export_data.hpp.
Default constructor.
Definition at line 45 of file export_data.cpp.
ExportData::~ExportData | ( | ) | [virtual] |
Destructor.
Definition at line 48 of file export_data.cpp.
returnValue ExportData::exportDataDeclaration | ( | std::ostream & | stream, |
const std::string & | _realString = "real_t" , |
||
const std::string & | _intString = "int" , |
||
int | _precision = 16 |
||
) | const [virtual] |
Exports declaration of the index variable. Its appearance can can be adjusted by various options.
[in] | stream | 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. |
Reimplemented in ExportArgument, and ExportIndex.
Definition at line 126 of file export_data.cpp.
ExportStruct ExportData::getDataStruct | ( | ) | const |
Returns the global data struct to which the data object belongs to.
Definition at line 109 of file export_data.cpp.
std::string ExportData::getDataStructString | ( | ) | const |
Returns a string containing the global data struct to which the data object belongs to.
Definition at line 115 of file export_data.cpp.
std::string ExportData::getDoc | ( | ) | const [virtual] |
Definition at line 146 of file export_data.cpp.
std::string ExportData::getFullName | ( | ) | const |
Returns the full name of the data object including the possible prefix of the global data struct.
Definition at line 121 of file export_data.cpp.
std::string ExportData::getName | ( | ) | const |
Returns the name of the data object.
Definition at line 86 of file export_data.cpp.
std::string ExportData::getPrefix | ( | ) | const |
Returns a string which contains a prefix name.
Definition at line 96 of file export_data.cpp.
ExportType ExportData::getType | ( | ) | const |
Returns the data type of the data object.
Definition at line 91 of file export_data.cpp.
std::string ExportData::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 101 of file export_data.cpp.
bool ExportData::isGiven | ( | ) | [virtual] |
Returns whether the index is set to a given value.
Definition at line 135 of file export_data.cpp.
ExportDataInternal * ExportData::operator-> | ( | ) |
An operator for access to functions and members of the node
Reimplemented from CasADi::SharedObject.
Reimplemented in ExportVariable, ExportArgument, and ExportIndex.
Definition at line 51 of file export_data.cpp.
const ExportDataInternal * ExportData::operator-> | ( | ) | const |
An operator for const access to functions and members of the node
Reimplemented from CasADi::SharedObject.
Reimplemented in ExportVariable, ExportArgument, and ExportIndex.
Definition at line 56 of file export_data.cpp.
returnValue ExportData::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 80 of file export_data.cpp.
returnValue ExportData::setDoc | ( | const std::string & | _doc | ) | [virtual] |
Definition at line 140 of file export_data.cpp.
returnValue ExportData::setName | ( | const std::string & | _name | ) |
Sets the name of the data object.
[in] | _name | New name of the data object. |
Definition at line 61 of file export_data.cpp.
returnValue ExportData::setPrefix | ( | const std::string & | _prefix | ) |
Sets the prefix which is placed before the structure name.
[in] | _prefix | Prefix name. |
Definition at line 74 of file export_data.cpp.
returnValue ExportData::setType | ( | ExportType | _type | ) |
Sets the data type of the data object.
[in] | _type | New data type of the data object. |
Definition at line 68 of file export_data.cpp.