Geant4  10.02.p03
G4String Class Reference

#include <G4String.hh>

Inheritance diagram for G4String:
Collaboration diagram for G4String:

Public Types

enum  caseCompare { exact, ignoreCase }
 
enum  stripType { leading, trailing, both }
 

Public Member Functions

 G4String ()
 
 G4String (char)
 
 G4String (const char *)
 
 G4String (const char *, str_size)
 
 G4String (const G4String &)
 
 G4String (const G4SubString &)
 
 G4String (const std::string &)
 
 ~G4String ()
 
G4Stringoperator= (const G4String &)
 
G4Stringoperator= (const std::string &)
 
G4Stringoperator= (const char *)
 
char operator() (str_size) const
 
char & operator() (str_size)
 
G4Stringoperator+= (const G4SubString &)
 
G4Stringoperator+= (const char *)
 
G4Stringoperator+= (const std::string &)
 
G4Stringoperator+= (const char &)
 
G4bool operator== (const G4String &) const
 
G4bool operator== (const char *) const
 
G4bool operator!= (const G4String &) const
 
G4bool operator!= (const char *) const
 
 operator const char * () const
 
G4SubString operator() (str_size, str_size)
 
G4int compareTo (const char *, caseCompare mode=exact) const
 
G4int compareTo (const G4String &, caseCompare mode=exact) const
 
G4Stringprepend (const char *)
 
G4Stringappend (const G4String &)
 
std::istream & readLine (std::istream &, G4bool skipWhite=true)
 
G4Stringreplace (unsigned int, unsigned int, const char *, unsigned int)
 
G4Stringreplace (str_size, str_size, const char *)
 
G4Stringremove (str_size)
 
G4Stringremove (str_size, str_size)
 
G4int first (char) const
 
G4int last (char) const
 
G4bool contains (const std::string &) const
 
G4bool contains (char) const
 
G4String strip (G4int strip_Type=trailing, char c=' ')
 
void toLower ()
 
void toUpper ()
 
G4bool isNull () const
 
str_size index (const char *, G4int pos=0) const
 
str_size index (char, G4int pos=0) const
 
str_size index (const G4String &, str_size, str_size, caseCompare) const
 
const char * data () const
 
G4int strcasecompare (const char *, const char *) const
 
unsigned int hash (caseCompare cmp=exact) const
 
unsigned int stlhash () const
 

Private Types

typedef std::string std_string
 

Private Attributes

int dummy
 

Detailed Description

Member Typedef Documentation

◆ std_string

typedef std::string G4String::std_string
private

Member Enumeration Documentation

◆ caseCompare

◆ stripType

Constructor & Destructor Documentation

◆ G4String() [1/7]

G4String::G4String ( )
inline
Here is the caller graph for this function:

◆ G4String() [2/7]

G4String::G4String ( char  )
inline

◆ G4String() [3/7]

G4String::G4String ( const char *  )
inline

◆ G4String() [4/7]

G4String::G4String ( const char *  ,
str_size   
)
inline

◆ G4String() [5/7]

G4String::G4String ( const G4String )
inline

◆ G4String() [6/7]

G4String::G4String ( const G4SubString )
inline

◆ G4String() [7/7]

G4String::G4String ( const std::string &  )
inline

◆ ~G4String()

G4String::~G4String ( )
inline

Definition at line 120 of file source/global/management/include/G4String.hh.

120 {}
Here is the call graph for this function:

Member Function Documentation

◆ append()

G4String& G4String::append ( const G4String )
inline
Here is the caller graph for this function:

◆ compareTo() [1/2]

G4int G4String::compareTo ( const char *  ,
caseCompare  mode = exact 
) const
inline
Here is the caller graph for this function:

◆ compareTo() [2/2]

G4int G4String::compareTo ( const G4String ,
caseCompare  mode = exact 
) const
inline

◆ contains() [1/2]

G4bool G4String::contains ( const std::string &  ) const
inline
Here is the caller graph for this function:

◆ contains() [2/2]

G4bool G4String::contains ( char  ) const
inline

◆ data()

const char* G4String::data ( ) const
inline
Here is the caller graph for this function:

◆ first()

G4int G4String::first ( char  ) const
inline
Here is the caller graph for this function:

◆ hash()

unsigned int G4String::hash ( caseCompare  cmp = exact) const
inline

◆ index() [1/3]

str_size G4String::index ( const char *  ,
G4int  pos = 0 
) const
inline
Here is the caller graph for this function:

◆ index() [2/3]

str_size G4String::index ( char  ,
G4int  pos = 0 
) const
inline

◆ index() [3/3]

str_size G4String::index ( const G4String ,
str_size  ,
str_size  ,
caseCompare   
) const
inline

◆ isNull()

G4bool G4String::isNull ( ) const
inline
Here is the caller graph for this function:

◆ last()

G4int G4String::last ( char  ) const
inline
Here is the caller graph for this function:

◆ operator const char *()

G4String::operator const char * ( ) const
inline

◆ operator!=() [1/2]

G4bool G4String::operator!= ( const G4String ) const
inline

◆ operator!=() [2/2]

G4bool G4String::operator!= ( const char *  ) const
inline

◆ operator()() [1/3]

char G4String::operator() ( str_size  ) const
inline

◆ operator()() [2/3]

char& G4String::operator() ( str_size  )
inline

◆ operator()() [3/3]

G4SubString G4String::operator() ( str_size  ,
str_size   
)
inline

◆ operator+=() [1/4]

G4String& G4String::operator+= ( const G4SubString )
inline

◆ operator+=() [2/4]

G4String& G4String::operator+= ( const char *  )
inline

◆ operator+=() [3/4]

G4String& G4String::operator+= ( const std::string &  )
inline

◆ operator+=() [4/4]

G4String& G4String::operator+= ( const char &  )
inline

◆ operator=() [1/3]

G4String& G4String::operator= ( const G4String )
inline

◆ operator=() [2/3]

G4String& G4String::operator= ( const std::string &  )
inline

◆ operator=() [3/3]

G4String& G4String::operator= ( const char *  )
inline

◆ operator==() [1/2]

G4bool G4String::operator== ( const G4String ) const
inline

◆ operator==() [2/2]

G4bool G4String::operator== ( const char *  ) const
inline

◆ prepend()

G4String& G4String::prepend ( const char *  )
inline
Here is the caller graph for this function:

◆ readLine()

std::istream& G4String::readLine ( std::istream &  ,
G4bool  skipWhite = true 
)
inline
Here is the caller graph for this function:

◆ remove() [1/2]

G4String& G4String::remove ( str_size  )
inline
Here is the caller graph for this function:

◆ remove() [2/2]

G4String& G4String::remove ( str_size  ,
str_size   
)
inline

◆ replace() [1/2]

G4String& G4String::replace ( unsigned  int,
unsigned  int,
const char *  ,
unsigned  int 
)
inline
Here is the caller graph for this function:

◆ replace() [2/2]

G4String& G4String::replace ( str_size  ,
str_size  ,
const char *   
)
inline

◆ stlhash()

unsigned int G4String::stlhash ( ) const
inline

◆ strcasecompare()

G4int G4String::strcasecompare ( const char *  ,
const char *   
) const
inline

◆ strip()

G4String G4String::strip ( G4int  strip_Type = trailing,
char  c = ' ' 
)
inline
Here is the caller graph for this function:

◆ toLower()

void G4String::toLower ( )
inline
Here is the caller graph for this function:

◆ toUpper()

void G4String::toUpper ( )
inline
Here is the caller graph for this function:

Member Data Documentation

◆ dummy

int G4String::dummy
private

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