EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PndStringSeparator Class Reference

#include <EicRoot/blob/master/PndTools/generalTools/PndStringSeparator.h>

+ Collaboration diagram for PndStringSeparator:

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
 

Detailed Description


     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.

View newest version in sPHENIX GitHub at line 30 of file PndStringSeparator.h

Constructor & Destructor Documentation

PndStringSeparator::PndStringSeparator ( )
inline

Definition at line 33 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 33 of file PndStringSeparator.h

PndStringSeparator::~PndStringSeparator ( )
inline

Definition at line 34 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 34 of file PndStringSeparator.h

PndStringSeparator::PndStringSeparator ( std::string  AInput,
std::string  ADelimiter = " " 
)

Definition at line 6 of file PndStringSeparator.cxx.

View newest version in sPHENIX GitHub at line 6 of file PndStringSeparator.cxx

Member Function Documentation

bool PndStringSeparator::GetIfFirst ( )
inline

Definition at line 42 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 42 of file PndStringSeparator.h

References fFirstDel.

Referenced by Replace().

+ Here is the caller graph for this function:

bool PndStringSeparator::GetIfLast ( )
inline

Definition at line 43 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 43 of file PndStringSeparator.h

References fLastDel.

Referenced by Replace().

+ Here is the caller graph for this function:

std::string PndStringSeparator::GetString ( void  )
private

Definition at line 11 of file PndStringSeparator.cxx.

View newest version in sPHENIX GitHub at line 11 of file PndStringSeparator.cxx

References fDelimiter, fInput, fStartPos, and pos().

Referenced by GetStringVector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< std::string > PndStringSeparator::GetStringVector ( void  )

Definition at line 35 of file PndStringSeparator.cxx.

View newest version in sPHENIX GitHub at line 35 of file PndStringSeparator.cxx

References fStartPos, fStrings, GetString(), ResetVector(), TestFirst(), TestLast(), and value.

Referenced by PndGeoHandling::DiveDownToFillSensNamePar(), PndFileNameCreator::GetFileName(), PndFileNameCreator::GetPath(), Replace(), PndFileNameCreator::TruncateFileName(), and PndFileNameCreator::TruncateInitial().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PndStringSeparator::Print ( void  )

Definition at line 68 of file PndStringSeparator.cxx.

View newest version in sPHENIX GitHub at line 68 of file PndStringSeparator.cxx

References fInput, and fStrings.

Referenced by PndFileNameCreator::GetPath().

+ Here is the caller graph for this function:

std::string PndStringSeparator::Replace ( std::string  from,
std::string  to 
)

Definition at line 51 of file PndStringSeparator.cxx.

View newest version in sPHENIX GitHub at line 51 of file PndStringSeparator.cxx

References fDelimiter, GetIfFirst(), GetIfLast(), GetStringVector(), and SetDelimiter().

+ Here is the call graph for this function:

void PndStringSeparator::ResetVector ( )
inline

Definition at line 38 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 38 of file PndStringSeparator.h

References fStrings.

Referenced by GetStringVector().

+ Here is the caller graph for this function:

void PndStringSeparator::SetDelimiter ( std::string  ADelimiter)
inline

Definition at line 37 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 37 of file PndStringSeparator.h

References fDelimiter.

Referenced by Replace().

+ Here is the caller graph for this function:

void PndStringSeparator::SetInput ( std::string  AInput)
inline

Definition at line 36 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 36 of file PndStringSeparator.h

References fInput.

void PndStringSeparator::TestFirst ( )
inline

Definition at line 40 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 40 of file PndStringSeparator.h

References fDelimiter, fFirstDel, and fInput.

Referenced by GetStringVector().

+ Here is the caller graph for this function:

void PndStringSeparator::TestLast ( )
inline

Definition at line 41 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 41 of file PndStringSeparator.h

References fDelimiter, fInput, and fLastDel.

Referenced by GetStringVector().

+ Here is the caller graph for this function:

Member Data Documentation

std::string PndStringSeparator::fDelimiter
private

Definition at line 51 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 51 of file PndStringSeparator.h

Referenced by GetString(), Replace(), SetDelimiter(), TestFirst(), and TestLast().

bool PndStringSeparator::fFirstDel
private

Definition at line 54 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 54 of file PndStringSeparator.h

Referenced by GetIfFirst(), and TestFirst().

std::string PndStringSeparator::fInput
private

Definition at line 50 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 50 of file PndStringSeparator.h

Referenced by GetString(), Print(), SetInput(), TestFirst(), and TestLast().

bool PndStringSeparator::fLastDel
private

Definition at line 55 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 55 of file PndStringSeparator.h

Referenced by GetIfLast(), and TestLast().

std::string PndStringSeparator::fOutput
private

Definition at line 52 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 52 of file PndStringSeparator.h

std::string::size_type PndStringSeparator::fStartPos
private

Definition at line 48 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 48 of file PndStringSeparator.h

Referenced by GetString(), and GetStringVector().

std::vector<std::string> PndStringSeparator::fStrings
private

Definition at line 49 of file PndStringSeparator.h.

View newest version in sPHENIX GitHub at line 49 of file PndStringSeparator.h

Referenced by GetStringVector(), Print(), and ResetVector().


The documentation for this class was generated from the following files: