laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for defining a string. More...

#include <LauString.hh>

Public Member Functions

 LauString ()
 Constructor for an empty string.
 
 LauString (const char *s)
 Constructor for a string using an array of characters. More...
 
 LauString (const std::string &s)
 Constructor for a string using an STL string. More...
 
 LauString (const TString &s)
 Constructor for a string using a TString. More...
 
 LauString (const LauString &s)
 Copy constructor.
 
LauStringoperator= (const LauString &s)
 Copy assignment operator.
 
virtual ~LauString ()
 Destructor.
 
void addInteger (int integer)
 Add an integer value to the string. More...
 
void addDouble (double value)
 Add a double value to the string. More...
 
void addText (const char *text)
 Add some text from a character array. More...
 
void addText (const std::string &text)
 Add some text from an STL string. More...
 
void addText (const TString &text)
 Add some text from a TString. More...
 
LauString operator+= (int integer)
 Add an integer to the string. More...
 
LauString operator+= (double value)
 Add a double to the string. More...
 
LauString operator+= (const char *text)
 Add some text from a character array. More...
 
LauString operator+= (const std::string &text)
 Add some text from an STL string. More...
 
LauString operator+= (const TString &text)
 Add some text from a TString. More...
 
std::string getString () const
 Retrieve the string as an STL string. More...
 
const char * getData () const
 Retrieve the string as an array of characters. More...
 
TString getTString () const
 Retrieve the string as a TString. More...
 
int size () const
 Retrieve the total size of the string. More...
 
std::vector< std::string > split (const std::string &splitter) const
 Split up a string according to a split string (e.g. ":" or " ") More...
 
std::vector< std::string > split (const LauString &splitter) const
 Split up a string according to a split string (e.g. ":" or " ") More...
 

Private Attributes

std::string theString_
 The string.
 

Detailed Description

Class for defining a string.

Definition at line 43 of file LauString.hh.

Constructor & Destructor Documentation

◆ LauString() [1/3]

LauString::LauString ( const char *  s)

Constructor for a string using an array of characters.

Parameters
[in]sstring text

Definition at line 42 of file LauString.cc.

◆ LauString() [2/3]

LauString::LauString ( const std::string &  s)

Constructor for a string using an STL string.

Parameters
[in]sstring text

Definition at line 47 of file LauString.cc.

◆ LauString() [3/3]

LauString::LauString ( const TString &  s)

Constructor for a string using a TString.

Parameters
[in]sstring text

Definition at line 52 of file LauString.cc.

Member Function Documentation

◆ addDouble()

void LauString::addDouble ( double  value)

Add a double value to the string.

Parameters
[in]valuedouble to add

Definition at line 81 of file LauString.cc.

◆ addInteger()

void LauString::addInteger ( int  integer)

Add an integer value to the string.

Parameters
[in]integerinteger to add

Definition at line 74 of file LauString.cc.

◆ addText() [1/3]

void LauString::addText ( const char *  text)
inline

Add some text from a character array.

Parameters
[in]texttext to add

Definition at line 92 of file LauString.hh.

◆ addText() [2/3]

void LauString::addText ( const std::string &  text)
inline

Add some text from an STL string.

Parameters
[in]texttext to add

Definition at line 98 of file LauString.hh.

◆ addText() [3/3]

void LauString::addText ( const TString &  text)
inline

Add some text from a TString.

Parameters
[in]texttext to add

Definition at line 104 of file LauString.hh.

◆ getData()

const char* LauString::getData ( ) const
inline

Retrieve the string as an array of characters.

Returns
the string as an array of characters

Definition at line 146 of file LauString.hh.

◆ getString()

std::string LauString::getString ( ) const
inline

Retrieve the string as an STL string.

Returns
the string as an STL string

Definition at line 140 of file LauString.hh.

◆ getTString()

TString LauString::getTString ( ) const
inline

Retrieve the string as a TString.

Returns
the string as a TString

Definition at line 152 of file LauString.hh.

◆ operator+=() [1/5]

LauString LauString::operator+= ( const char *  text)

Add some text from a character array.

Parameters
[in]texttext to add

Definition at line 100 of file LauString.cc.

◆ operator+=() [2/5]

LauString LauString::operator+= ( const std::string &  text)

Add some text from an STL string.

Parameters
[in]texttext to add

Definition at line 106 of file LauString.cc.

◆ operator+=() [3/5]

LauString LauString::operator+= ( const TString &  text)

Add some text from a TString.

Parameters
[in]texttext to add

Definition at line 112 of file LauString.cc.

◆ operator+=() [4/5]

LauString LauString::operator+= ( double  value)

Add a double to the string.

Parameters
[in]valuedouble to add

Definition at line 94 of file LauString.cc.

◆ operator+=() [5/5]

LauString LauString::operator+= ( int  integer)

Add an integer to the string.

Parameters
[in]integerinteger to add

Definition at line 88 of file LauString.cc.

◆ size()

int LauString::size ( ) const
inline

Retrieve the total size of the string.

Returns
the total size of the string

Definition at line 158 of file LauString.hh.

◆ split() [1/2]

std::vector< std::string > LauString::split ( const LauString splitter) const

Split up a string according to a split string (e.g. ":" or " ")

Parameters
[in]splittersubstring to split on

Definition at line 118 of file LauString.cc.

◆ split() [2/2]

std::vector< std::string > LauString::split ( const std::string &  splitter) const

Split up a string according to a split string (e.g. ":" or " ")

Parameters
[in]splittersubstring to split on

Definition at line 125 of file LauString.cc.


The documentation for this class was generated from the following files:
  • /home/epp/phsdba/Development/Laura++/master-dev/laura/inc/LauString.hh
  • /home/epp/phsdba/Development/Laura++/master-dev/laura/src/LauString.cc