Public Member Functions | Friends

Defines a scalar-valued index variable to be used for exporting code. More...

#include <export_index.hpp>

Inheritance diagram for ExportIndex:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual returnValue exportDataDeclaration (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
 ExportIndex ()
 ExportIndex (const int _value)
 ExportIndex (const std::string &_name, const std::string &_prefix=std::string())
const std::string get () const
int getGivenValue () const
bool isBinary () const
bool isGiven () const
bool isVariable () const
 operator ExportArgument ()
ExportIndexNodeoperator-> ()
const ExportIndexNodeoperator-> () const

Friends

ExportIndex operator% (const ExportIndex &_arg1, const ExportIndex &_arg2)
ExportIndex operator* (const ExportIndex &_arg1, const ExportIndex &_arg2)
ExportIndex operator+ (const ExportIndex &_arg1, const ExportIndex &_arg2)
ExportIndex operator- (const ExportIndex &_arg1, const ExportIndex &_arg2)
ExportIndex operator/ (const ExportIndex &_arg1, const ExportIndex &_arg2)
std::string operator== (const ExportIndex &_arg1, const ExportIndex &_arg2)

Detailed Description

Defines a scalar-valued index variable to be used for exporting code.

The class ExportIndex defines a scalar-valued index variable to be used for exporting code. Instances of this class can be used similar to usual integers but offer additional functionality, e.g. they allow to export arithmetic expressions involving indices of the form:

Author:
Hans Joachim Ferreau, Boris Houska, Milan Vukov

Definition at line 54 of file export_index.hpp.


Constructor & Destructor Documentation

Definition at line 44 of file export_index.cpp.

ExportIndex::ExportIndex ( const int  _value)

Definition at line 48 of file export_index.cpp.

ExportIndex::ExportIndex ( const std::string &  _name,
const std::string &  _prefix = std::string() 
) [explicit]

Definition at line 53 of file export_index.cpp.


Member Function Documentation

returnValue ExportIndex::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.

Parameters:
[in]streamName of file to be used to export function.
[in]_realStringstd::string to be used to declare real variables.
[in]_intStringstd::string to be used to declare integer variables.
[in]_precisionNumber of digits to be used for exporting real values.
Returns:
SUCCESSFUL_RETURN

Reimplemented from ExportData.

Definition at line 72 of file export_index.cpp.

const std::string ExportIndex::get ( ) const

Returns a string containing the value of the index.

Returns:
std::string containing the value of the index.

Reimplemented from CasADi::SharedObject.

Definition at line 246 of file export_index.cpp.

Returns the given value of the index (if defined).

Returns:
Given value of the index or "undefinedValue".

Definition at line 252 of file export_index.cpp.

bool ExportIndex::isBinary ( ) const

Definition at line 263 of file export_index.cpp.

bool ExportIndex::isGiven ( ) const

Returns whether the index is set to a given value.

Returns:
true iff index is set to a given value,
false otherwise

Definition at line 258 of file export_index.cpp.

bool ExportIndex::isVariable ( ) const

Definition at line 268 of file export_index.cpp.

ExportIndex::operator ExportArgument ( )

Definition at line 274 of file export_index.cpp.

ExportIndexNode * ExportIndex::operator-> ( )

An operator for access to functions and members of the node

Reimplemented from ExportData.

Definition at line 60 of file export_index.cpp.

const ExportIndexNode * ExportIndex::operator-> ( ) const

An operator for const access to functions and members of the node

Reimplemented from ExportData.

Definition at line 66 of file export_index.cpp.


Friends And Related Function Documentation

ExportIndex operator% ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 217 of file export_index.cpp.

ExportIndex operator* ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 166 of file export_index.cpp.

ExportIndex operator+ ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 82 of file export_index.cpp.

ExportIndex operator- ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 125 of file export_index.cpp.

ExportIndex operator/ ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 199 of file export_index.cpp.

std::string operator== ( const ExportIndex _arg1,
const ExportIndex _arg2 
) [friend]

Definition at line 235 of file export_index.cpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:24