#include <export_data_internal.hpp>
Public Member Functions | |
virtual ExportDataInternal * | clone () const =0 |
Make a deep copy of the instance. More... | |
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 () |
Public Member Functions inherited from CasADi::SharedObjectNode | |
void | assertInit () const |
Assert that the object has been initialized. More... | |
virtual void | deepCopyMembers (std::map< SharedObjectNode *, SharedObject > &already_copied) |
Deep copy data members. More... | |
int | getCount () const |
Get the reference count. More... | |
virtual void | init () |
Initialize the object. More... | |
bool | isInit () const |
Check if the object has been initialized. More... | |
SharedObjectNode & | operator= (const SharedObjectNode &node) |
Assignment operator. More... | |
virtual void | print (std::ostream &stream) const |
Print a destription of the object. More... | |
virtual void | repr (std::ostream &stream) const |
Print a representation of the object. More... | |
SharedObjectNode () | |
Default constructor. More... | |
SharedObjectNode (const SharedObjectNode &node) | |
Copy constructor. More... | |
virtual | ~SharedObjectNode ()=0 |
Destructor. More... | |
Static Public Attributes | |
static std::string | fcnPrefix = "acado" |
Protected Member Functions | |
returnValue | setFullName (void) |
Protected Member Functions inherited from CasADi::SharedObjectNode | |
template<class B > | |
B | shared_from_this () |
Get a shared object from the current internal object. More... | |
template<class B > | |
const B | shared_from_this () const |
Get a shared object from the current internal object. More... | |
Protected Attributes | |
ExportStruct | dataStruct |
std::string | description |
std::string | fullName |
std::string | name |
std::string | prefix |
ExportType | type |
Protected Attributes inherited from CasADi::SharedObjectNode | |
bool | is_init_ |
Has the function been initialized? More... | |
Definition at line 33 of file export_data_internal.hpp.
|
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 39 of file export_data_internal.cpp.
|
virtual |
Destructor.
Definition at line 50 of file export_data_internal.cpp.
|
pure virtual |
Make a deep copy of the instance.
Implements CasADi::SharedObjectNode.
Implemented in ExportVariableInternal, ExportArgumentInternal, and ExportIndexNode.
|
pure virtual |
Exports declaration of the index variable. Its appearance can can be adjusted by various options.
@param[in] file Name of file to be used to export function. @param[in] _realString std::string to be used to declare real variables. @param[in] _intString std::string to be used to declare integer variables. @param[in] _precision Number of digits to be used for exporting real values. \return SUCCESSFUL_RETURN
Implemented in ExportArgumentInternal, and ExportIndexNode.
ExportStruct ExportDataInternal::getDataStruct | ( | ) | const |
Returns the global data struct to which the data object belongs to.
\return Global data struct to which the data object belongs to
Definition at line 141 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.
\return String containing the global data struct to which the data object belongs to.
Definition at line 147 of file export_data_internal.cpp.
|
virtual |
Definition at line 253 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 195 of file export_data_internal.cpp.
std::string ExportDataInternal::getName | ( | ) | const |
Returns the name of the data object.
\return Name of the data object
Definition at line 100 of file export_data_internal.cpp.
std::string ExportDataInternal::getPrefix | ( | ) | const |
Returns a string which contains a prefix name.
Definition at line 110 of file export_data_internal.cpp.
ExportType ExportDataInternal::getType | ( | ) | const |
Returns the data type of the data object.
\return Data type of the data object
Definition at line 105 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.
@param[in] _realString std::string to be used to declare real variables. @param[in] _intString std::string to be used to declare integer variables. \return std::string containing the data type of the data object.
Definition at line 115 of file export_data_internal.cpp.
|
pure virtual |
Returns whether the index is set to a given value.
\return true iff index is set to a given value, \n false otherwise
Implemented in ExportArgumentInternal, ExportVariableInternal, and ExportIndexNode.
returnValue ExportDataInternal::setDataStruct | ( | ExportStruct | _dataStruct | ) |
Sets the global data struct to which the data object belongs to.
@param[in] _dataStruct New global data struct to which the data object belongs to. \return SUCCESSFUL_RETURN
Definition at line 88 of file export_data_internal.cpp.
|
virtual |
Definition at line 246 of file export_data_internal.cpp.
|
protected |
Definition at line 214 of file export_data_internal.cpp.
returnValue ExportDataInternal::setName | ( | const std::string & | _name | ) |
Sets the name of the data object.
@param[in] _name New name of the data object. \return SUCCESSFUL_RETURN
Definition at line 54 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 78 of file export_data_internal.cpp.
returnValue ExportDataInternal::setType | ( | ExportType | _type | ) |
Sets the data type of the data object.
@param[in] _type New data type of the data object. \return SUCCESSFUL_RETURN
Definition at line 68 of file export_data_internal.cpp.
|
protected |
Global data struct to which the data object belongs to (if any).
Definition at line 186 of file export_data_internal.hpp.
|
protected |
Description of the variable
Definition at line 192 of file export_data_internal.hpp.
|
static |
Definition at line 196 of file export_data_internal.hpp.
|
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.
|
protected |
Name of the data object.
Definition at line 177 of file export_data_internal.hpp.
|
protected |
Prefix, which is added before the structure name
Definition at line 183 of file export_data_internal.hpp.
|
protected |
Data type of the data object.
Definition at line 180 of file export_data_internal.hpp.