Public Member Functions | List of all members

Abstract base class to define variables to be used for exporting code. More...

#include <export_data.hpp>

Inheritance diagram for ExportData:
Inheritance graph
[legend]

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 ()
 
ExportDataInternaloperator-> ()
 
const ExportDataInternaloperator-> () 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 ()
 
- Public Member Functions inherited from CasADi::SharedObject
void assertInit () const
 Assert that it is initialized. More...
 
void assignNode (SharedObjectNode *node)
 Assign the node to a node class pointer (or null) More...
 
void assignNodeNoCount (SharedObjectNode *node)
 Assign the node to a node class pointer without reference counting: inproper use will cause memory leaks! More...
 
virtual bool checkNode () const
 Assert that the node is pointing to the right type of object. More...
 
SharedObject clone () const
 Deep copy. More...
 
const SharedObjectNodeget () const
 Get a const pointer to the node. More...
 
SharedObjectNodeget ()
 Get a pointer to the node. More...
 
int getCount () const
 Get the reference count. More...
 
void init ()
 Initialize the object: more documentation in the node class (SharedObjectNode and derived classes) More...
 
bool isInit () const
 Is initialized? More...
 
bool isNull () const
 Is a null pointer? More...
 
SharedObjectNodeoperator-> ()
 Access a member function or object. More...
 
const SharedObjectNodeoperator-> () const
 Const access a member function or object. More...
 
SharedObjectoperator= (const SharedObject &ref)
 Assignment operator. More...
 
virtual void print (std::ostream &stream=std::cout) const
 Print a destription of the object. More...
 
virtual void repr (std::ostream &stream) const
 Print a representation of the object. More...
 
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &ref)
 Copy constructor (shallow copy) More...
 
void swap (SharedObject &other)
 Swap content with another instance. More...
 
 ~SharedObject ()
 Destructor. More...
 
void makeUnique (bool clone_members=true)
 If there are other references to the object, then make a deep copy of it and point to this new object. More...
 
void makeUnique (std::map< SharedObjectNode *, SharedObject > &already_copied, bool clone_members=true)
 
- Public Member Functions inherited from CasADi::PrintableObject
std::string getDescription () const
 Return a string with a destription (for SWIG) More...
 
std::string getRepresentation () const
 Return a string with a representation (for SWIG) More...
 

Detailed Description

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.

Author
Hans Joachim Ferreau, Boris Houska, Milan Vukov

Definition at line 55 of file export_data.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO ExportData::ExportData ( )

Default constructor.

Definition at line 45 of file export_data.cpp.

ExportData::~ExportData ( )
virtual

Destructor.

Definition at line 48 of file export_data.cpp.

Member Function Documentation

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.

@param[in] stream                           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

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.

\return 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.

\return std::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.

Returns
Full name of the data object

Definition at line 121 of file export_data.cpp.

std::string ExportData::getName ( ) const

Returns the name of the data object.

\return 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.

Returns
Prefix name

Definition at line 96 of file export_data.cpp.

ExportType ExportData::getType ( ) const

Returns the data type of the data object.

\return 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.

@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 101 of file export_data.cpp.

bool ExportData::isGiven ( )
virtual

Returns whether the index is set to a given value.

\return true  iff index is set to a given value, \n
        false otherwise

Definition at line 135 of file export_data.cpp.

ExportDataInternal * ExportData::operator-> ( )

An operator for access to functions and members of the node

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

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.

@param[in] _dataStruct              New global data struct to which the data object belongs to.

\return SUCCESSFUL_RETURN

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.

@param[in] _name                    New name of the data object.

\return SUCCESSFUL_RETURN

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.

Parameters
[in]_prefixPrefix name.
Returns
SUCCESSFUL_RETURN

Definition at line 74 of file export_data.cpp.

returnValue ExportData::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.cpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:23