Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ExportDataInternal Class Referenceabstract

#include <export_data_internal.hpp>

Inheritance diagram for ExportDataInternal:
Inheritance graph
[legend]

Public Member Functions

virtual ExportDataInternalclone () 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...
 
SharedObjectNodeoperator= (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 >
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...
 

Detailed Description

Definition at line 33 of file export_data_internal.hpp.

Constructor & Destructor Documentation

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.

Parameters
[in]_nameName of the data object.
[in]_typeData type of the data object.
[in]_dataStructGlobal data struct to which the data object belongs to (if any).
[in]_prefixOptional prefix that will be put in front of the name.

Definition at line 39 of file export_data_internal.cpp.

ExportDataInternal::~ExportDataInternal ( )
virtual

Destructor.

Definition at line 50 of file export_data_internal.cpp.

Member Function Documentation

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.

@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.

std::string ExportDataInternal::getDoc ( ) const
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.

Returns
Full name of the data object

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.

Returns
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.

virtual bool ExportDataInternal::isGiven ( ) const
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.

returnValue ExportDataInternal::setDoc ( const std::string &  _doc)
virtual

Definition at line 246 of file export_data_internal.cpp.

returnValue ExportDataInternal::setFullName ( void  )
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.

Parameters
[in]_prefixPrefix name.
Returns
SUCCESSFUL_RETURN

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.

Member Data Documentation

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.

BEGIN_NAMESPACE_ACADO std::string ExportDataInternal::fcnPrefix = "acado"
static

Definition at line 196 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.


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