OpenASIP
2.0
|
#include <TCEString.hh>
Classes | |
struct | ICLess |
Public Member Functions | |
TCEString () | |
TCEString (const char *text) | |
TCEString (const std::string &text) | |
TCEString (const char c) | |
virtual | ~TCEString () |
TCEString & | replaceString (const std::string &old, const std::string &newString) |
bool | startsWith (const std::string &str) const |
bool | endsWith (const std::string &str) const |
bool | ciEqual (const TCEString &other) const |
std::vector< TCEString > | split (const std::string &delim) const |
TCEString & | appendIf (bool expression, stringCRef ifTrue) |
TCEString | lower () const |
TCEString | upper () const |
TCEString | capitalize () const |
TCEString | operator+ (int val) const |
TCEString | operator+ (char c) const |
TCEString & | operator<< (const TCEString &rhs) |
TCEString & | operator<< (const char *rhs) |
TCEString & | operator<< (const int rhs) |
Static Public Member Functions | |
static TCEString | toUpper (const TCEString &str, const std::locale &loc=std::locale()) |
static std::string | toUpper (const std::string &str, const std::locale &loc=std::locale()) |
static TCEString & | toUpper (TCEString &str, const std::locale &loc=std::locale()) |
static std::string & | toUpper (std::string &str, const std::locale &loc=std::locale()) |
static std::string | toLower (const std::string &str, const std::locale &loc=std::locale()) |
static std::string & | appendToNonEmpty (std::string &toAppend, stringCRef appender) |
static std::string | appendToNonEmpty (stringCRef toAppend, stringCRef appender) |
static std::string | applyIf (bool expression, stringCRef ifTrue, stringCRef ifFalse) |
static std::string | applyIf (bool expression, stringCRef ifTrue) |
template<typename IntegerType > | |
static std::string & | appendInteger (std::string &toAppend, const IntegerType &appender) |
template<typename IntegerType > | |
static std::string | appendInteger (stringCRef toAppend, const IntegerType &appender) |
template<typename IterableContainer > | |
static std::string | makeString (const IterableContainer &container, const std::string &separator=", ") |
static unsigned | replace (std::string &str, const std::string &oldPattern, const std::string &newPattern) |
static std::string | filterDigits (const std::string &str) |
A simple wrapper around std::string to make forward declarations possible.
Also provides additional string helpers.
Definition at line 53 of file TCEString.hh.
TCEString::TCEString | ( | ) |
Definition at line 40 of file TCEString.cc.
Referenced by operator+(), and operator<<().
TCEString::TCEString | ( | const char * | text | ) |
Definition at line 43 of file TCEString.cc.
TCEString::TCEString | ( | const std::string & | text | ) |
Definition at line 46 of file TCEString.cc.
TCEString::TCEString | ( | const char | c | ) |
Definition at line 49 of file TCEString.cc.
|
virtual |
Definition at line 52 of file TCEString.cc.
TCEString & TCEString::appendIf | ( | bool | expression, |
stringCRef | ifTrue | ||
) |
Definition at line 119 of file TCEString.cc.
|
static |
|
static |
|
static |
Appends a string if the target string is not empty.
toAppend | The target string. |
appender | The string to append with. |
Definition at line 201 of file TCEString.cc.
Referenced by appendToNonEmpty(), and DefaultDecoderGenerator::writeSquashSignalGenerationProcess().
|
static |
Returns string of target string appended with another string if the target string is not empty.
toAppend | The target string. |
appender | The string to append with. |
Definition at line 219 of file TCEString.cc.
References appendToNonEmpty().
|
static |
Returns string if "expression" is true. Otherwise return empty string.
Definition at line 241 of file TCEString.cc.
References applyIf().
|
static |
Returns first string if "expression" is true. Otherwise return second.
Definition at line 229 of file TCEString.cc.
Referenced by applyIf(), and ProGe::NetlistVisualization::printBlockTree().
TCEString TCEString::capitalize | ( | ) | const |
Return a copy of the string with its first character in upper case and the rest in lower case.
Definition at line 106 of file TCEString.cc.
References StringTools::stringToLower(), StringTools::stringToUpper(), and upper().
bool TCEString::ciEqual | ( | const TCEString & | other | ) | const |
Returns true if two strings are equal if the case is not taken into account.
a | A string. |
b | Another string. |
Definition at line 63 of file TCEString.cc.
Referenced by OperationIndex::effectiveOperation(), ControlFlowGraph::findLLVMTargetInstrDesc(), OperationIndex::moduleOf(), and OperationDAGSelector::CaseInsensitiveCmp::operator()().
bool TCEString::endsWith | ( | const std::string & | str | ) | const |
|
static |
Returns string in which all non-digit characters have been removed.
Definition at line 278 of file TCEString.cc.
TCEString TCEString::lower | ( | ) | const |
Turns the string to lowercase.
Definition at line 78 of file TCEString.cc.
References StringTools::stringToLower().
Referenced by ProGe::NetlistGenerator::checkInstanceName(), IPXactModel::extractModelParam(), OperationPoolPimpl::operation(), TCETools::CaseInsensitiveCmp::operator()(), TCEString::ICLess::operator()(), OTAOperationDialog::TransferDataToWindow(), ProGe::VHDLNetlistWriter::writeGenericDeclaration(), ProGe::VerilogNetlistWriter::writeGenericDeclaration(), SOPCBuilderFileGenerator::writeGenerics(), ProGe::VerilogNetlistWriter::writePortMappings(), and ProGe::VHDLNetlistWriter::writePortMappings().
|
static |
TCEString TCEString::operator+ | ( | char | c | ) | const |
Definition at line 151 of file TCEString.cc.
References TCEString().
TCEString TCEString::operator+ | ( | int | val | ) | const |
Definition at line 146 of file TCEString.cc.
References TCEString(), and Conversion::toString().
TCEString & TCEString::operator<< | ( | const char * | rhs | ) |
Definition at line 134 of file TCEString.cc.
References TCEString().
TCEString & TCEString::operator<< | ( | const int | rhs | ) |
Definition at line 140 of file TCEString.cc.
References Conversion::toString().
Definition at line 128 of file TCEString.cc.
|
static |
Replaces all occurrences of oldPattern in str with newPattern.
Definition at line 251 of file TCEString.cc.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), replaceString(), and OperationDAGDialog::updateDAG().
TCEString & TCEString::replaceString | ( | const std::string & | old, |
const std::string & | newString | ||
) |
Replaces all occurrences of string 'old' with 'newString'
Definition at line 94 of file TCEString.cc.
References replace().
Referenced by IDF::MachineImplementation::checkImplFile(), IDF::MachineImplementation::decompressorFile(), DataDependenceGraph::dotString(), HDLTemplateInstantiator::fillPlaceholders(), getPasmPacket(), IDF::UnitImplementationLocation::hdbFile(), IDF::MachineImplementation::icDecoderHDB(), IDF::MachineImplementation::icDecoderPluginFile(), HDLTemplateInstantiator::instantiateTemplateFile(), IDF::MachineImplementation::isLibraryImplFile(), main(), and printLatexFunctionUnitDescription().
std::vector< TCEString > TCEString::split | ( | const std::string & | delim | ) | const |
Definition at line 114 of file TCEString.cc.
References StringTools::chopString().
Referenced by ControlFlowGraph::buildMBBFromBB(), llvm::LLVMTCEPOMBuilder::createFUTerminal(), main(), and PRegionMarkerAnalyzer::parsePregionID().
bool TCEString::startsWith | ( | const std::string & | str | ) | const |
Referenced by ControlFlowGraph::buildMBBFromBB(), VectorLSGenerator::createVectorLSU(), llvm::LLVMTCEBuilder::emitSpecialInlineAsm(), llvm::LLVMTCEIRBuilder::isExplicitReturn(), PRegionMarkerAnalyzer::isPregionEndMarker(), PRegionMarkerAnalyzer::isPregionStartMarker(), Environment::longHDBPath(), MachineInfo::maxMemoryAlignment(), Environment::shortHDBPath(), ProGe::VHDLNetlistWriter::writeGenericDeclaration(), ProGe::VerilogNetlistWriter::writeGenericDeclaration(), and SOPCBuilderFileGenerator::writeGenerics().
|
static |
Definition at line 184 of file TCEString.cc.
|
static |
Definition at line 162 of file TCEString.cc.
References toUpper().
|
static |
Definition at line 156 of file TCEString.cc.
Referenced by ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), and toUpper().
|
static |
Definition at line 176 of file TCEString.cc.
Definition at line 168 of file TCEString.cc.
TCEString TCEString::upper | ( | ) | const |
Turns the string to uppercase.
Definition at line 86 of file TCEString.cc.
References StringTools::stringToUpper().
Referenced by capitalize(), Operation::isBaseOffsetMemOperation(), ImmInfo::key(), MIDDGNode::osalOperationName(), MachineInfo::supportsOperation(), TDGen::writeOperationDefs(), and TDGen::writePortGuardedJumpDefPair().