laura is hosted by Hepforge, IPPP Durham
Laura++  v3r3
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. More...
 
 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. More...
 
LauStringoperator= (const LauString &s)
 Copy assignment operator. More...
 
virtual ~LauString ()
 Destructor. More...
 
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. More...
 

Detailed Description

Class for defining a string.

Definition at line 29 of file LauString.hh.

Constructor & Destructor Documentation

LauString::LauString ( )

Constructor for an empty string.

Definition at line 23 of file LauString.cc.

LauString::LauString ( const char *  s)

Constructor for a string using an array of characters.

Parameters
[in]sstring text

Definition at line 27 of file LauString.cc.

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

Constructor for a string using an STL string.

Parameters
[in]sstring text

Definition at line 31 of file LauString.cc.

LauString::LauString ( const TString &  s)

Constructor for a string using a TString.

Parameters
[in]sstring text

Definition at line 35 of file LauString.cc.

LauString::LauString ( const LauString s)

Copy constructor.

Definition at line 39 of file LauString.cc.

LauString::~LauString ( )
virtual

Destructor.

Definition at line 51 of file LauString.cc.

Member Function Documentation

void LauString::addDouble ( double  value)

Add a double value to the string.

Parameters
[in]valuedouble to add

Definition at line 62 of file LauString.cc.

void LauString::addInteger ( int  integer)

Add an integer value to the string.

Parameters
[in]integerinteger to add

Definition at line 55 of file LauString.cc.

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

Add some text from a character array.

Parameters
[in]texttext to add

Definition at line 79 of file LauString.hh.

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

Add some text from an STL string.

Parameters
[in]texttext to add

Definition at line 85 of file LauString.hh.

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

Add some text from a TString.

Parameters
[in]texttext to add

Definition at line 91 of file LauString.hh.

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 133 of file LauString.hh.

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

Retrieve the string as an STL string.

Returns
the string as an STL string

Definition at line 127 of file LauString.hh.

TString LauString::getTString ( ) const
inline

Retrieve the string as a TString.

Returns
the string as a TString

Definition at line 139 of file LauString.hh.

LauString LauString::operator+= ( int  integer)

Add an integer to the string.

Parameters
[in]integerinteger to add

Definition at line 69 of file LauString.cc.

LauString LauString::operator+= ( double  value)

Add a double to the string.

Parameters
[in]valuedouble to add

Definition at line 75 of file LauString.cc.

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

Add some text from a character array.

Parameters
[in]texttext to add

Definition at line 81 of file LauString.cc.

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

Add some text from an STL string.

Parameters
[in]texttext to add

Definition at line 87 of file LauString.cc.

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

Add some text from a TString.

Parameters
[in]texttext to add

Definition at line 93 of file LauString.cc.

LauString & LauString::operator= ( const LauString s)

Copy assignment operator.

Definition at line 43 of file LauString.cc.

int LauString::size ( ) const
inline

Retrieve the total size of the string.

Returns
the total size of the string

Definition at line 145 of file LauString.hh.

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 106 of file LauString.cc.

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 99 of file LauString.cc.

Member Data Documentation

std::string LauString::theString_
private

The string.

Definition at line 163 of file LauString.hh.


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