ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Protected Attributes | Friends

Provides a very rudimentary class to handle strings. More...

#include <acado_string.hpp>

Inheritance diagram for String:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 String ()
 Default constructor.
 String (const char *name_)
 Constructor taking a char-pointer.
 String (const double &val_)
 Constructor taking a double value.
 String (const int &val_)
 Constructor taking a double value.
 String (const uint &val_)
 String (const String &arg)
 Copy constructor.
Stringoperator= (const String &arg)
 Assignment operator.
Stringoperator= (const char *name_)
 Assignment operator.
char operator() (uint idx) const
 Access operator.
 ~String ()
 Destructor.
returnValue print () const
 Prints the String.
returnValue print (FILE *file) const
 Prints the String.
Stringoperator+= (const String &arg)
 add operator
Stringoperator+= (const char *arg)
 add operator
Stringoperator<< (const String &arg)
 add operator
Stringoperator<< (const char *arg)
 add operator
BooleanType operator== (const String &arg) const
BooleanType operator== (const char *const arg) const
uint getLength () const
 get length
const char * getName () const
 Returns the name of the string.
BooleanType isEmpty () const
 test whether the string is empty
returnValue copy (const String &arg)
 copy routine (protected, for internal use only)

Protected Attributes

std::vector< char > name
 the char-vector

Friends

String operator<< (const char *_lhs, const String &rhs)
String operator+ (const String &arg1, const String &arg2)
 Addition operator.
std::ostream & operator<< (std::ostream &os, const String &s)
 Print to STD stream.

Detailed Description

The class String provides a very rudimentary class to handle strings.

Author:
Boris Houska, Hans Joachim Ferreau

Constructor & Destructor Documentation

Referenced by operator+=(), and operator=().

String::String ( const char *  name_)

References MAX_LENGTH_STRING, and name.

String::String ( const double &  val_)
String::String ( const int &  val_)

References MAX_LENGTH_STRING, name, and sign().

String::String ( const uint val_)

References MAX_LENGTH_STRING, name, and sign().

String::String ( const String arg)

References copy().


Member Function Documentation

returnValue String::copy ( const String arg)

References name, and SUCCESSFUL_RETURN.

Referenced by operator=(), and String().

const char * String::getName ( ) const

References name.

Referenced by MemoryAllocator::add(), ModelData::addOutput(), ExportGaussElim::appendVariableNames(), ExportAuxiliaryFunctions::configure(), ExportSimulinkInterface::configure(), ExportMatlabRhs::configure(), OCPexport::exportCode(), ExportStatementString::exportCode(), SIMexport::exportCode(), ExportForLoop::exportCode(), ExportAcadoFunction::exportCode(), ExportArithmeticStatement::exportCode(), ExportFunctionCall::exportCode(), ExportFunction::exportCode(), FunctionEvaluationTree::exportCode(), ExportArithmeticStatement::exportCodeAddSubtract(), ExportArithmeticStatement::exportCodeAssign(), ExportArithmeticStatement::exportCodeMultiply(), ExportIndexNode::exportDataDeclaration(), ExportAcadoFunction::exportDataDeclaration(), ExportArgumentInternal::exportDataDeclaration(), ExportAcadoFunction::exportForwardDeclaration(), ExportFunction::exportForwardDeclaration(), FunctionEvaluationTree::exportHeader(), ExportTemplatedFile::fillTemplate(), ExportVariableInternal::get(), ExportArgumentInternal::getAddressString(), AdjointIRKExport::getCode(), ForwardIRKExport::getCode(), ExplicitRungeKuttaExport::getCode(), DiscreteTimeExport::getCode(), ImplicitRungeKuttaExport::getCode(), ExportVariableInternal::getCol(), ExportVariableInternal::getCols(), ExportData::getName(), ExportVariableInternal::getRow(), ExportVariableInternal::getRows(), ExportVariableInternal::getSubMatrix(), ExportIndex::makeArgument(), ExportFile::openFile(), ExportAlgorithm::openFile(), ExportIndexComparator::operator()(), StringComparer::operator()(), operator<<(), ExportVariableInternal::print(), MemoryAllocator::release(), ExportCholeskyDecomposition::setup(), NARXExport::setup(), DiscreteTimeExport::setup(), ExportGaussNewtonCN2::setupCondensing(), ExportGaussNewtonCondensed::setupCondensing(), ExportGaussNewtonForces::setupConstraintsEvaluation(), ExportGaussNewtonCN2::setupEvaluation(), ExportGaussNewtonForces::setupEvaluation(), ExportGaussNewtonCondensed::setupEvaluation(), ExportGaussNewtonQpDunes::setupQPInterface(), ExportGaussNewtonForces::setupQPInterface(), ExportGaussNewtonCN2::setupQPInterface(), ExportGaussNewtonCondensed::setupQPInterface(), and ExportNLPSolver::setupSimulation().

char String::operator() ( uint  idx) const

References ASSERT, getLength(), and name.

String & String::operator+= ( const String arg)

References getLength(), name, and uint.

Referenced by operator+=(), Stream::operator<<(), and operator<<().

String & String::operator+= ( const char *  arg)

References operator+=(), and String().

String & String::operator<< ( const String arg)

Reimplemented in Stream.

References operator+=().

String & String::operator<< ( const char *  arg)

Reimplemented in Stream.

References operator+=().

String & String::operator= ( const String arg)

References copy().

Referenced by operator=().

String & String::operator= ( const char *  name_)

Reimplemented in Stream.

References operator=(), and String().

BooleanType String::operator== ( const String arg) const

References BT_FALSE, BT_TRUE, getLength(), name, and uint.

BooleanType String::operator== ( const char *const  arg) const

References BT_FALSE, BT_TRUE, getLength(), name, and uint.

References acadoPrintf(), name, and SUCCESSFUL_RETURN.

Referenced by operator<<(), and Frame::print().

returnValue String::print ( FILE *  file) const

Friends And Related Function Documentation

String operator+ ( const String arg1,
const String arg2 
) [friend]
String operator<< ( const char *  _lhs,
const String rhs 
) [friend]
std::ostream& operator<< ( std::ostream &  os,
const String s 
) [friend]

Member Data Documentation

std::vector<char> String::name [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines