FairRoot/PandaRoot
|
#include <PndStringSeparator.h>
Public Member Functions | |
PndStringSeparator () | |
~PndStringSeparator () | |
PndStringSeparator (std::string AInput, std::string ADelimiter=" ") | |
void | SetInput (std::string AInput) |
void | SetDelimiter (std::string ADelimiter) |
void | ResetVector () |
std::vector< std::string > | GetStringVector (void) |
void | TestFirst () |
void | TestLast () |
bool | GetIfFirst () |
bool | GetIfLast () |
std::string | Replace (std::string from, std::string to) |
void | Print () |
Private Member Functions | |
std::string | GetString (void) |
Private Attributes | |
std::string::size_type | fStartPos |
std::vector< std::string > | fStrings |
std::string | fInput |
std::string | fDelimiter |
std::string | fOutput |
bool | fFirstDel |
bool | fLastDel |
PndStringSeparator Version 1.0 by Tobias Stockmanns
Seperates an input string into substrings and stores them in a string vector. The seperation criteria is a string of characters. If no delimiters are given the default delimiter " " is used.
Example: std::vector<std::string> fOutput TPndStringVector fInput("Column:Row Type: Test ", ": "); fOutput = fInput.GetStringVector();
fOutput[0] = "Column" fOutput[1] = "Row" fOutput[2] = "Type" fOutput[3] = "Test"
Definition at line 30 of file PndStringSeparator.h.
|
inline |
Definition at line 33 of file PndStringSeparator.h.
|
inline |
Definition at line 34 of file PndStringSeparator.h.
PndStringSeparator::PndStringSeparator | ( | std::string | AInput, |
std::string | ADelimiter = " " |
||
) |
Definition at line 6 of file PndStringSeparator.cxx.
|
inline |
|
inline |
|
private |
Definition at line 11 of file PndStringSeparator.cxx.
References fDelimiter, fInput, fStartPos, and pos.
Referenced by GetStringVector().
std::vector< std::string > PndStringSeparator::GetStringVector | ( | void | ) |
Definition at line 35 of file PndStringSeparator.cxx.
References fStartPos, fStrings, GetString(), ResetVector(), TestFirst(), and TestLast().
Referenced by PndGeoHandling::DiveDownToFillSensNamePar(), PndMvdDigiAna::Exec(), PndLmdNoiseProducer::FillSensorLists(), PndMvdNoiseProducer::FillSensorLists(), PndFileNameCreator::GetFileName(), PndFileNameCreator::GetPath(), Replace(), PndFileNameCreator::TruncateFileName(), and PndFileNameCreator::TruncateInitial().
void PndStringSeparator::Print | ( | ) |
Definition at line 68 of file PndStringSeparator.cxx.
References fInput, fStrings, and i.
Referenced by PndFileNameCreator::GetPath().
std::string PndStringSeparator::Replace | ( | std::string | from, |
std::string | to | ||
) |
Definition at line 51 of file PndStringSeparator.cxx.
References fDelimiter, GetIfFirst(), GetIfLast(), GetStringVector(), i, and SetDelimiter().
|
inline |
Definition at line 38 of file PndStringSeparator.h.
References fStrings.
Referenced by GetStringVector().
|
inline |
|
inline |
|
inline |
Definition at line 40 of file PndStringSeparator.h.
References fDelimiter, fFirstDel, and fInput.
Referenced by GetStringVector().
|
inline |
Definition at line 41 of file PndStringSeparator.h.
References fDelimiter, fInput, and fLastDel.
Referenced by GetStringVector().
|
private |
Definition at line 51 of file PndStringSeparator.h.
Referenced by GetString(), Replace(), SetDelimiter(), TestFirst(), and TestLast().
|
private |
Definition at line 54 of file PndStringSeparator.h.
Referenced by GetIfFirst(), and TestFirst().
|
private |
Definition at line 50 of file PndStringSeparator.h.
Referenced by GetString(), Print(), SetInput(), TestFirst(), and TestLast().
|
private |
Definition at line 55 of file PndStringSeparator.h.
Referenced by GetIfLast(), and TestLast().
|
private |
Definition at line 52 of file PndStringSeparator.h.
|
private |
Definition at line 48 of file PndStringSeparator.h.
Referenced by GetString(), and GetStringVector().
|
private |
Definition at line 49 of file PndStringSeparator.h.
Referenced by GetStringVector(), Print(), and ResetVector().