ACADO Toolkit
1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
|
Provides a very rudimentary class to handle strings. More...
#include <acado_string.hpp>
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. | |
String & | operator= (const String &arg) |
Assignment operator. | |
String & | operator= (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. | |
String & | operator+= (const String &arg) |
add operator | |
String & | operator+= (const char *arg) |
add operator | |
String & | operator<< (const String &arg) |
add operator | |
String & | operator<< (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. |
The class String provides a very rudimentary class to handle strings.
Referenced by operator+=(), and operator=().
String::String | ( | const char * | name_ | ) |
References MAX_LENGTH_STRING, and name.
String::String | ( | const double & | val_ | ) |
References BT_FALSE, BT_TRUE, dot(), MAX_LENGTH_STRING, and name.
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().
String::~String | ( | ) |
returnValue String::copy | ( | const String & | arg | ) |
References name, and SUCCESSFUL_RETURN.
Referenced by operator=(), and String().
uint String::getLength | ( | ) | const |
References name.
Referenced by isEmpty(), operator()(), operator+=(), operator==(), and FunctionEvaluationTree::setGlobalExportVariableName().
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().
BooleanType String::isEmpty | ( | ) | const |
References BT_FALSE, BT_TRUE, and getLength().
Referenced by ModelData::addOutput(), Expression::assignmentSetup(), ExportFunctionCall::exportCode(), ExportArgumentInternal::exportDataDeclaration(), ExportFunction::exportForwardDeclaration(), ExportDataInternal::getDataStructString(), ExportDataInternal::getFullName(), ExportFunction::isDefined(), TreeProjection::loadIndices(), ExportFile::openFile(), ExportAlgorithm::openFile(), ExportDataInternal::setFullName(), ModelData::setModel(), ExportDataInternal::setName(), ExportModule::setName(), ExportFunction::setName(), ExportFunctionCall::setName(), and ModelData::setNARXmodel().
char String::operator() | ( | uint | idx | ) | const |
References ASSERT, getLength(), and name.
References getLength(), name, and uint.
Referenced by operator+=(), Stream::operator<<(), and operator<<().
String & String::operator+= | ( | const char * | arg | ) |
References operator+=(), and String().
Reimplemented in Stream.
References operator+=().
String & String::operator<< | ( | const char * | arg | ) |
Reimplemented in Stream.
References operator+=().
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.
returnValue String::print | ( | ) | const |
References acadoPrintf(), name, and SUCCESSFUL_RETURN.
Referenced by operator<<(), and Frame::print().
returnValue String::print | ( | FILE * | file | ) | const |
References acadoFPrintf(), name, and SUCCESSFUL_RETURN.
std::ostream& operator<< | ( | std::ostream & | os, |
const String & | s | ||
) | [friend] |
std::vector<char> String::name [protected] |
Referenced by copy(), getLength(), getName(), Frame::getName(), operator()(), operator+=(), operator==(), print(), and String().