|
LRAUV
revA
|
Replacement for standard template class string. More...
#include <Str.h>


Public Member Functions | |
| Str (const char *str=NULL, size_t length=NO_POS) | |
| char* constructor Unit tests in Str_Test.testConstructorCharStar More... | |
| Str (const Str &str, const size_t offset=0, size_t count=NO_POS) | |
| copy constructor Unit tests in Str_Test.testCopyConstructor More... | |
| Str (const bool var) | |
| bool constructor Unit tests in Str_Test.testBoolConstructor More... | |
| Str (const double var, unsigned int precision=6) | |
| double constructor Unit tests in Str_Test.testDoubleConstructor More... | |
| Str (const int var, unsigned int radix=10, unsigned int radixOffset=0) | |
| int constructor Unit tests in Str_Test.testIntConstructor More... | |
| Str (const size_t var, unsigned int radix=16) | |
| size_t constructor Unit tests in Str_Test.testUnsignedIntConstructor More... | |
| virtual | ~Str () |
| destructor More... | |
| Str & | set (const char *str=NULL, size_t length=NO_POS) |
| Str & | operator= (const char *str) |
| Str & | operator= (const Str &str) |
| Str & | operator= (const double var) |
| Str | substr (const size_t offset, size_t count=NO_POS) const |
| char | operator[] (const size_t index) const |
| Str & | operator+= (const bool str) |
| Str & | operator+= (const unsigned char str) |
| Str & | operator+= (const double str) |
| Str & | operator+= (const int str) |
| Str & | operator+= (const size_t str) |
| Str & | operator+= (const char *str) |
| Str & | operator+= (const Str &str) |
| Str & | append (const Str &str) |
| Str & | append (const char *str, size_t length) |
| Str & | pushBack (const unsigned char str) |
| Str & | operator<< (const bool str) |
| Str & | operator<< (const unsigned char str) |
| Str & | operator<< (const double str) |
| Str & | operator<< (const int str) |
| Str & | operator<< (const size_t str) |
| Str & | operator<< (const char *str) |
| Str & | operator<< (const Str &str) |
| bool | operator!= (const Str &str) const |
| bool | operator!= (const char *str) const |
| int | compare (const Str &str) const |
| int | compare (const char *str) const |
| bool | operator== (const Str &str) const |
| bool | operator== (const char *str) const |
| bool | operator< (const Str &str) const |
| const char * | cStr () const |
| const char * | data () const |
| size_t | length () const |
| size_t | size () const |
| size_t | findLastOf (const unsigned char str) const |
| returns the position of the specified character in the string, looking from the end of the string towards the beginning. More... | |
| size_t | findLastOf (const char *str) const |
| returns the position of the specified character string in the string, looking from the end of the string towards the beginning. More... | |
| size_t | find (const unsigned char str, size_t offset=0) const |
| size_t | find (const char *str, size_t offset=0) const |
| size_t | find (const Str &str, size_t offset=0) const |
| bool | startsWith (const char *str, size_t length=NO_POS) const |
| bool | startsWith (const Str &str) const |
| bool | endsWith (const Str &str) const |
| bool | setChar (size_t index, const unsigned char theChar) |
| void | replaceChar (const char replace, const char replaceWith) |
| Str * | split (int &num, const char *splitSpec, size_t length=NO_POS) const |
| Str * | split (int &num, const Str str) const |
| Str | asHex () const |
| Return a new Str, with a hex representation of each character of this string. More... | |
Static Public Member Functions | |
| static size_t | FindLastOf (const char *str, const unsigned char theChar, size_t length=NO_POS) |
| static size_t | Find (const char *str, const unsigned char theChar, size_t length=NO_POS) |
| static unsigned int | IntToAscii (int value, char *str, unsigned int base, unsigned int bufSize, unsigned int baseOffset=0) |
| convert an integer to a string, returns the length of the string Unit tests in Str_Test.testIntToAscii More... | |
Static Public Attributes | |
| static const size_t | NO_POS |
| static constants More... | |
| static const size_t | MAX_LEN |
| static const Str | EMPTY_STR |
| static char | NoChars_ [1] = "" |
Protected Member Functions | |
| virtual void | intoString (const double var, unsigned int precision=10) |
| virtual void | intoString (int var, unsigned int radix, unsigned int radixOffset=0) |
Protected Attributes | |
| size_t | length_ |
| char * | chars_ |
Friends | |
| Str | operator+ (const char *var, const Str &str) |
| Str | operator+ (const Str &var, const Str &str) |
Replacement for standard template class string.
| Str::Str | ( | const char * | str = NULL, |
| size_t | length = NO_POS |
||
| ) |
char* constructor Unit tests in Str_Test.testConstructorCharStar
References set().
Referenced by append(), ElementURI::buildURI(), UniversalURI::FindURI(), ElementURI::FindURI(), operator+=(), split(), and substr().
copy constructor Unit tests in Str_Test.testCopyConstructor
| Str::Str | ( | const bool | var | ) |
bool constructor Unit tests in Str_Test.testBoolConstructor
References chars_.
|
inline |
double constructor Unit tests in Str_Test.testDoubleConstructor
References intoString().
|
inline |
int constructor Unit tests in Str_Test.testIntConstructor
References intoString().
|
inline |
size_t constructor Unit tests in Str_Test.testUnsignedIntConstructor
References intoString().
References Str().
Referenced by TextTableLogWriter::TextTableLogWriter().
| Str Str::asHex | ( | ) | const |
Return a new Str, with a hex representation of each character of this string.
References chars_, and length_.
Referenced by Str_Test::testAsHex().
| int Str::compare | ( | const Str & | str | ) | const |
References chars_, length_, and NoChars_.
Referenced by StrValue::compare(), UartStream::DeviceToUART(), operator!=(), operator<(), and operator==().
|
inline |
References chars_.
Referenced by ESPComm::acceptClient(), NetCdfWriter::addDim(), NavChartDb::addEncData(), NetCdfWriter::addGroup(), NetCdfWriter::addStaticVar(), Behavior::addValueClause(), NetCdfWriter::addVar(), JsonLogWriter::addVar(), NetCdfTableLogWriter::addVar(), HDF5LogWriter::addVar(), NetCdfLogWriter::addVar(), Rowe_600::appendEnsembleToFile(), NavChartDb::appendToContour(), NavChartDb::appendToSoundings(), LuaNode::asNewDataValue(), ESPClient::checkCmdCompleteTimeout(), ESPClient::checkCmdResultTimeout(), MappedIOStream::close(), FileLogWriter::close(), CommandLine::commandBang(), CommandLine::commandConfigSet(), CommandLine::commandDo(), CommandLine::commandRestartApplication(), CommandLine::commandResume(), CommandLine::commandRetransmit(), CommandLine::commandShowComponent(), CommandLine::commandShowDependencies(), CommandLine::commandShowVariable(), EnvSimulator::configureSensors(), ESPComm::connectAsClient(), ESPClient::consumeResult(), Config::CopyFileToDir(), StrValue::copyTo(), BlobValue::copyTo(), NavChartDb::createContour(), ESPComponent::createESPComm(), NavChartDb::createSoundings(), DataOverHttps::dataRead(), DataOverHttps::dataWrite(), DataOverHttps::dataWriting(), DeviceIOStream::DeviceIOStream(), NavChartDb::doIndexing(), ScheduledItem::DoScheduled(), LzmaEncoder::encode(), ZipEncoder::encode(), FileLogReader::FileLogReader(), FileLogWriter::FileLogWriter(), MissionStateLogger::Filter(), HDF5File::finalize(), Supervisor::GenerateDataDir(), BlobValue::getBytes(), BlobValue::getElement(), DecimationLogManager::getFileWriter(), Supervisor::GetLatestLogFilename(), ESPComponent::getLine(), ESPClient::getLine(), CommandLine::getLines(), MappedIOStream::getName(), DeviceIOStream::getName(), FileInStream::getName(), FileIOStream::getName(), FileOutStream::getName(), LuaNode::getNamedNode(), Supervisor::GetToShoreFilename(), ESPClient::handleException(), HDF5Attribute::HDF5Attribute(), HDF5File::HDF5File(), NavChartDb::initDataDir(), PeakDetectHorizontal::initialize(), PeakDetectVsDepth::initialize(), MissionManager::initialize(), ReadDataComponent::initializeReaders(), Assign::Instance(), SendDataComponent::Instance(), SyslogComponent::Instance(), Config::Instance(), DefineBehavior::Instance(), ESPClient::issueCommand(), Config::LoadConfigFilesInPath(), HFRadarCompactModelForecaster::loadHistory(), SimulatorUtils::LoadInit(), ModuleLoader::loadLibraryModule(), LuaMissionAPI::loadMissionFile(), ModuleLoader::loadModules(), DataOverHttps::loadParams(), MissionManager::LoadRootNode(), MissionStateLogger::LogArgWrite(), main(), FileLogReader::matchAndOpen(), ParsedCommand::matchComponent(), ParsedCommand::matchMission(), Method::Method(), Simulator::motion(), NetCdfTableLogWriter::netCdfInitialize(), NetCdfLogWriter::netCdfInitialize(), Component::newBlobReaderFromUniversal(), LuaNode::newChildFunction(), LuaNode::newChildNode(), Component::newDataReaderFromUniversal(), LuaAPI::NewFunction(), MissionStateLogger::NewResume(), MissionStateLogger::NewRun(), Behavior::newSettingReader(), Component::newUniversalBlobWriter(), FileLogReader::nextFilename(), SplitFileLogWriter::nextFilename(), MappedIOStream::open(), LuaNode::open(), OutStream::operator<<(), ModuleLoader::PathExists(), Config::Persist(), ThreadHandler::PthreadJoinTimeout(), StrIOStream::read(), FileLogReader::read(), AbstractBlobReader::read1DArray(), AbstractBlobReader::read1DPtr(), AbstractBlobReader::read2DArray(), AbstractBlobReader::read2DPtr(), AbstractBlobReader::read3DArray(), AbstractBlobReader::read3DPtr(), BPC1::readConfig(), ESPComm::readLine(), NetCdfReader::readStr(), ValueClause::ReadStrValueUri(), FileLogWriter::resetFilename(), MissionManager::resumeLoadedMission(), NAL9602::retrieveAndQueueIncoming(), NavChartDb::run(), HFRadarModelCalc::run(), DataOverHttps::run(), Unserialize::Run(), Execute::runIfUnsatisfied(), NavChartDb::saveEncs(), EncReader::scan(), ESPComponent::scanEspServerPort(), NAL9602::sendingFillBuffer(), NAL9602::sendingVerify(), MissionStateLogger::SetActive(), NetCdfWriter::setAttValue(), BlobValue::setElement(), BlobValue::setFrom(), MissionStateLogger::SetRepeatIndex(), MultiHandler::shutdown(), SplitFileLogWriter::split(), ESPComponent::starting(), Rowe_600LCM::starting(), ESPComponent::startPPP(), startsWith(), ESPComm::submitAbort(), Logger::syslog(), DataOverHttps::tcpConnect(), Str_Test::testAsHex(), Str_Test::testBoolConstructor(), Str_Test::testConstructorCharStar(), Str_Test::testCopyConstructor(), Str_Test::testDoubleConstructor(), Str_Test::testIntConstructor(), CommandLine_Test::testParse(), FastMap_Test::testPutGetAndSizeNoDuplicatesDynamic(), CodedStr_Test::testRead(), ElementURI_Test::testRead(), StrValue_Test::testSetFrom(), Str_Test::testSizeTConstructor(), StrValue::toStream(), UartStream::uartIdToString(), UartStream::uartToDevice(), NavChartDb::updateClosest(), CodedStr::write(), MultiLogWriter::write(), TextLogWriter::write(), SplitFileLogWriter::write(), ElementURI::write(), AbstractBlobWriter::write1DArray(), AbstractBlobWriter::write1DPtr(), AbstractBlobWriter::write2DArray(), AbstractBlobWriter::write2DPtr(), AbstractBlobWriter::write3DArray(), AbstractBlobWriter::write3DPtr(), JsonLogWriter::writeData(), HDF5Dataset::writeDataValue(), KmlLogWriter::writeHeader(), NetCdfWriter::writeRecord(), KmlLogWriter::writeSyslogItems(), and NetCdfWriter::writeVarRecord().
|
inline |
References chars_.
Referenced by SyslogEntry::write().
|
inline |
References find(), and length_.
Referenced by Unserialize::Run().
| size_t Str::find | ( | const unsigned char | str, |
| size_t | offset = 0 |
||
| ) | const |
References chars_, length_, and NO_POS.
Referenced by JsonLogWriter::addVar(), HDF5LogWriter::addVar(), NetCdfLogWriter::addVar(), CommandLine::commandDo(), Slate::ConfigureNewDataElement(), endsWith(), MissionItem::findArgReader(), Aggregate::getItemByRefId(), PeakDetectHorizontal::initialize(), PeakDetectVsDepth::initialize(), ReadDataComponent::Instance(), ModuleLoader::loadModule(), Config::LoadPersistedConfigSets(), DVL_micro::logVoltageAndCurrent(), CANONSampler::logVoltageAndCurrent(), VemcoVR2C::logVoltageAndCurrent(), ISUS::logVoltageAndCurrent(), AcousticModem_Benthos_ATM900::logVoltageAndCurrent(), DAT::logVoltageAndCurrent(), ESPComponent::logVoltageAndCurrent(), FileLogReader::matchAndOpen(), Turbulence_NPS::receive(), Unserialize::Run(), SCPI::runnable(), ElevatorServo::runnable(), MassServo::runnable(), BuoyancyServo::runnable(), RudderServo::runnable(), Aanderaa_O2::runnable(), Radio_Surface::runnable(), WetLabsBB2FL::runnable(), PNI_TCM::runnable(), AHRS_3DMGX3::runnable(), ThrusterServo::runnable(), CTD_NeilBrown::runnable(), AHRS_sp3003D::runnable(), Rowe_600LCM::runnable(), Rowe_600::runnable(), NAL9602::runnable(), split(), DVL_micro::stopping(), ESPComponent::stopping(), ValueClause::StripPastColon(), and MultiLogWriter::write().
| size_t Str::find | ( | const char * | str, |
| size_t | offset = 0 |
||
| ) | const |
| size_t Str::find | ( | const Str & | str, |
| size_t | offset = 0 |
||
| ) | const |
|
static |
References length(), and NO_POS.
Referenced by is_child().
| size_t Str::findLastOf | ( | const unsigned char | str | ) | const |
returns the position of the specified character in the string, looking from the end of the string towards the beginning.
| str | the character to look for |
References chars_, length_, and NO_POS.
Referenced by ZipEncoder::encode(), HDF5LogWriter::initializeHDF5LogWriter(), JsonLogWriter::initializeJsonLogWriter(), Config::Instance(), FileLogReader::matchAndOpen(), NetCdfTableLogWriter::netCdfInitialize(), NetCdfLogWriter::netCdfInitialize(), Unserialize::Run(), ValueClause::StripPastLastDot(), and Str_Test::testFindLastOf().
| size_t Str::findLastOf | ( | const char * | str | ) | const |
|
static |
References length(), and NO_POS.
Referenced by ParsedCommand::matchMission().
|
protectedvirtual |
|
protectedvirtual |
References chars_, IntToAscii(), length(), length_, and NoChars_.
|
static |
convert an integer to a string, returns the length of the string Unit tests in Str_Test.testIntToAscii
Referenced by intoString(), Str_Test::testIntToAscii(), Str_Test::testIntToAsciiWithOffset(), and OutStream::writeInteger().
|
inline |
References length_.
Referenced by NetCdfWriter::addAtt(), ElementURI::buildURI(), CommandLine::commandBang(), CommandLine::commandDo(), StrValue::copyTo(), ESPComponent::createESPComm(), DataOverHttps::dataWrite(), StrIOStream::eof(), MissionStateLogger::Filter(), Find(), FindLastOf(), Supervisor::GenerateDataDir(), BlobValue::getByteLength(), BlobValue::getElements(), Aggregate::getItemByRefId(), ESPComponent::getLine(), ESPClient::getLine(), ESPComm::hasEspServerAddressAndPort(), HDF5Attribute::HDF5Attribute(), intoString(), ESPClient::isSuccessfulSampling(), DataOverHttps::loadParams(), Config::LoadPersistedConfigSets(), MissionStateLogger::LogArgWrite(), MissionManager::LogMission(), FileLogReader::matchAndOpen(), ParsedCommand::matchComponent(), ParsedCommand::matchConfigVariable(), ParsedCommand::matchMission(), ParsedCommand::matchUnit(), ParsedCommand::matchUniversal(), ParsedCommand::matchVariable(), MissionStateLogger::NewRun(), OutStream::operator<<(), Config::Persist(), StrIOStream::read(), ESPComm::readLine(), Unserialize::Run(), Execute::runIfUnsatisfied(), NAL9602::sendingFillBuffer(), set(), MissionStateLogger::SetActive(), ESPClient::setError(), StrValue::setFrom(), MissionStateLogger::SetRepeatIndex(), split(), ESPComponent::starting(), startsWith(), ESPComm::submitAbort(), Str_Test::testAsHex(), Str_Test::testBoolConstructor(), Str_Test::testConstructorCharStar(), Str_Test::testCopyConstructor(), Str_Test::testDoubleConstructor(), Str_Test::testIntConstructor(), CommandLine_Test::testParse(), Str_Test::testSizeTConstructor(), StrValue::toStream(), BlobValue::toString(), MultiLogWriter::write(), TextLogWriter::write(), StrIOStream::write(), SyslogEntry::write(), HDF5Dataset::writeDataValue(), and KmlLogWriter::writeSyslogItems().
|
inline |
References compare().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References intoString().
|
inline |
References compare().
|
inline |
| void Str::replaceChar | ( | const char | replace, |
| const char | replaceWith | ||
| ) |
References chars_, length(), length_, NO_POS, and NoChars_.
Referenced by operator=(), BlobValue::setFrom(), BlobValue::setFromRaw(), and Str().
|
inline |
References length_.
Referenced by ModuleLoader::loadModule(), StrIOStream::write(), and HDF5Dataset::writeDataValue().
References chars_, find(), length(), length_, NO_POS, and Str().
Referenced by NavChartDb::initialize(), Unserialize::Run(), split(), and Str_Test::testSplit().
| bool Str::startsWith | ( | const char * | str, |
| size_t | length = NO_POS |
||
| ) | const |
References chars_, length_, and NO_POS.
Referenced by ESPClient::advanceInteraction(), SyslogStartRule::check(), CommandLine::commandRetransmit(), MissionStateLogger::ConfigureFilterArg(), MissionManager::LoadRootNode(), ParsedCommand::matchConfigVariable(), ParsedCommand::matchUnit(), ParsedCommand::matchUniversal(), ParsedCommand::matchVariable(), Unserialize::Run(), and startsWith().
|
inline |
References cStr(), length(), and startsWith().
References chars_, length_, NO_POS, and Str().
Referenced by JsonLogWriter::addVar(), HDF5LogWriter::addVar(), NetCdfLogWriter::addVar(), MissionStateLogger::ConfigureFilterArg(), Slate::ConfigureNewDataElement(), MissionItem::findArgReader(), Config::Instance(), Config::LoadPersistedConfigSets(), FileLogReader::matchAndOpen(), Unserialize::Run(), NAL9602::sendingFillBuffer(), ValueClause::StripPastColon(), and ValueClause::StripPastLastDot().
|
protected |
Referenced by asHex(), compare(), cStr(), data(), find(), findLastOf(), intoString(), operator+=(), operator=(), operator[](), replaceChar(), set(), setChar(), split(), startsWith(), Str(), substr(), and ~Str().
|
static |
Referenced by Aanderaa_O2::Aanderaa_O2(), ScheduledItem::AddNext(), ScheduledItem::AddTimed(), JsonLogWriter::addVar(), NetCdfTableLogWriter::addVar(), NetCdfLogWriter::addVar(), HDF5LogWriter::addVar(), LuaNode::asNewDataValue(), SettingReader::asString(), ScheduledItem::Clear(), StrIOStream::clear(), CommandLine::commandDo(), CommandLine::commandRestartApplication(), DataOverHttps::dataRead(), DataOverHttps::dataWrite(), UnitRegistry::GetIndexedKey(), Supervisor::GetLatestLogFilename(), CommandLine::getLines(), Supervisor::GetToShoreFilename(), NavChartDb::initialize(), ValueDetect::initialize(), Simulator::initialize(), Config::Instance(), ScheduledItem::List(), Config::LoadConfigFiles(), Config::LoadConfigFilesInPath(), NavChartDb::loadEncs(), main(), ParsedCommand::matchConfigDir(), ParsedCommand::matchConfigSubDir(), ParsedCommand::matchMission(), ParsedCommand::matchQuotedString(), NAL9602::NAL9602(), parse_line(), BinaryLogReader::read(), WetLabsBB2FL::readConfig(), ValueClause::ReadSide(), MissionManager::resumeLoadedMission(), DataOverHttps::run(), Unserialize::Run(), NAL9602::sendingFillBuffer(), NAL9602::sendingVerify(), SplitFileLogWriter::split(), Str_Test::testConstructorCharStar(), StrIOStream_Test::testWriteUShortCompact(), FailureMode::ToString(), ValueClause::toString(), ParsedCommand::undefTopArg(), NAL9602::verifySessionXmit(), MostRecentLogWriter::wipe(), and KmlLogWriter::writeSyslogItems().
|
protected |
Referenced by asHex(), compare(), endsWith(), find(), findLastOf(), intoString(), length(), operator+=(), operator=(), operator[](), replaceChar(), set(), setChar(), size(), split(), startsWith(), Str(), and substr().
|
static |
Referenced by Str_Test::testCopyConstructor().
|
static |
static constants
Referenced by JsonLogWriter::addVar(), NetCdfLogWriter::addVar(), HDF5LogWriter::addVar(), Slate::ConfigureNewDataElement(), find(), Find(), MissionItem::findArgReader(), findLastOf(), FindLastOf(), Aggregate::getItemByRefId(), PeakDetectHorizontal::initialize(), PeakDetectVsDepth::initialize(), ValueDetect::initialize(), HDF5LogWriter::initializeHDF5LogWriter(), JsonLogWriter::initializeJsonLogWriter(), ReadDataComponent::Instance(), is_child(), Config::LoadPersistedConfigSets(), FileLogReader::matchAndOpen(), ParsedCommand::matchMission(), NetCdfTableLogWriter::netCdfInitialize(), NetCdfLogWriter::netCdfInitialize(), MissionStateLogger::NewResume(), Unserialize::Run(), set(), split(), startsWith(), Str(), ValueClause::StripPastColon(), ValueClause::StripPastLastDot(), substr(), and Str_Test::testFindLastOf().
|
static |
Referenced by compare(), intoString(), operator+=(), operator=(), set(), and ~Str().