Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+53 -52
View File
@@ -23,67 +23,68 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4String
//
// Class description:
//
//
//---------------------------------------------------------------
// GEANT 4 class header file
//
// G4String
//
// Class description:
//
// Definition of a Geant4 string.
// Derived from the Rogue Wave implementation of RWCString;
// it uses intrinsically STL string.
// Definition of a Geant4 string.
// Derived from the Rogue Wave implementation of RWCString;
// it uses intrinsically STL std::string.
//---------------------------------------------------------------
#ifndef __G4String
#define __G4String
// Author: G.Cosmo, 11 November 1999
//---------------------------------------------------------------------
#ifndef G4String_hh
#define G4String_hh 1
#include <cstring>
#include <iostream>
#include <stdio.h>
#include <string>
#include <cstring>
#include "G4Types.hh"
#include <iostream>
#ifdef WIN32
#define strcasecmp _stricmp
# define strcasecmp _stricmp
#endif
typedef std::string::size_type str_size;
using str_size = std::string::size_type;
class G4String : public std::string
{
using std_string = std::string;
typedef std::string std_string;
public:
enum caseCompare
{
exact,
ignoreCase
};
enum stripType
{
leading,
trailing,
both
};
public:
enum caseCompare { exact, ignoreCase };
enum stripType { leading, trailing, both };
inline G4String ();
inline G4String ( char );
inline G4String ( const char * );
inline G4String ( const char *, str_size );
inline G4String ( const G4String& );
inline G4String ( const std::string & );
inline G4String ( G4String&& ) = default;
~G4String () {}
inline G4String();
inline G4String(char);
inline G4String(const char*);
inline G4String(const char*, str_size);
inline G4String(const G4String&);
inline G4String(const std::string&);
inline G4String(G4String&&) = default;
~G4String() {}
inline G4String& operator=(const G4String&);
inline G4String& operator=(const std::string &);
inline G4String& operator=(const std::string&);
inline G4String& operator=(const char*);
inline G4String& operator=(G4String&&) = default;
inline char operator () (str_size) const;
inline char& operator () (str_size);
inline char operator()(str_size) const;
inline char& operator()(str_size);
inline G4String& operator+=(const char*);
inline G4String& operator+=(const std::string &);
inline G4String& operator+=(const std::string&);
inline G4String& operator+=(const char&);
inline G4bool operator==(const G4String&) const;
inline G4bool operator==(const char*) const;
@@ -93,16 +94,16 @@ public:
inline operator const char*() const;
inline G4String operator()(str_size, str_size);
inline G4int compareTo(const char*, caseCompare mode=exact) const;
inline G4int compareTo(const G4String&, caseCompare mode=exact) const;
inline G4int compareTo(const char*, caseCompare mode = exact) const;
inline G4int compareTo(const G4String&, caseCompare mode = exact) const;
inline G4String& prepend (const char*);
inline G4String& append (const G4String&);
inline G4String& prepend(const char*);
inline G4String& append(const G4String&);
inline std::istream& readLine (std::istream&, G4bool skipWhite=true);
inline G4String& replace (unsigned int, unsigned int,
const char*, unsigned int );
inline std::istream& readLine(std::istream&, G4bool skipWhite = true);
inline G4String& replace(unsigned int, unsigned int, const char*,
unsigned int);
inline G4String& replace(str_size, str_size, const char*);
inline G4String& remove(str_size);
@@ -118,22 +119,22 @@ public:
// stripType = 1 end
// stripType = 2 both
//
inline G4String strip (G4int strip_Type=trailing, char c=' ');
inline G4String strip(G4int strip_Type = trailing, char c = ' ');
inline void toLower ();
inline void toUpper ();
inline void toLower();
inline void toUpper();
inline G4bool isNull() const;
inline str_size index (const char*, G4int pos=0) const;
inline str_size index (char, G4int pos=0) const;
inline str_size index (const G4String&, str_size, str_size, caseCompare) const;
inline str_size index(const char*, G4int pos = 0) const;
inline str_size index(char, G4int pos = 0) const;
inline str_size index(const G4String&, str_size, str_size, caseCompare) const;
inline const char* data() const;
inline G4int strcasecompare(const char*, const char*) const;
inline unsigned int hash( caseCompare cmp = exact ) const;
inline unsigned int hash(caseCompare cmp = exact) const;
inline unsigned int stlhash() const;
};