Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// G4UIcommand
|
||||
|
||||
#ifndef G4UIcommand_h
|
||||
#define G4UIcommand_h 1
|
||||
// Author: Makoto Asai (SLAC)
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4UIcommand_hh
|
||||
#define G4UIcommand_hh 1
|
||||
|
||||
#include "G4UIparameter.hh"
|
||||
class G4UImessenger;
|
||||
@@ -131,7 +131,7 @@ class G4UIcommand
|
||||
public:
|
||||
inline const G4String & GetRange() const
|
||||
{ return rangeString; };
|
||||
inline G4int GetGuidanceEntries() const
|
||||
inline size_t GetGuidanceEntries() const
|
||||
{ return commandGuidance.size(); }
|
||||
inline const G4String & GetGuidanceLine(G4int i) const
|
||||
{ return commandGuidance[i]; }
|
||||
@@ -139,7 +139,7 @@ class G4UIcommand
|
||||
{ return commandPath; }
|
||||
inline const G4String & GetCommandName() const
|
||||
{ return commandName; }
|
||||
inline G4int GetParameterEntries() const
|
||||
inline size_t GetParameterEntries() const
|
||||
{ return parameter.size(); }
|
||||
inline G4UIparameter * GetParameter(G4int i) const
|
||||
{ return parameter[i]; }
|
||||
@@ -150,8 +150,8 @@ class G4UIcommand
|
||||
public: // with description
|
||||
inline void SetParameter(G4UIparameter *const newParameter)
|
||||
{
|
||||
parameter.push_back( newParameter );
|
||||
newVal.resize( parameter.size() );
|
||||
parameter.push_back( newParameter );
|
||||
newVal.resize( parameter.size() );
|
||||
}
|
||||
// Defines a parameter. This method is used by the derived command classes
|
||||
// but the user can directly use this command when he/she defines a command
|
||||
@@ -168,10 +168,10 @@ class G4UIcommand
|
||||
public:
|
||||
inline const G4String GetTitle() const
|
||||
{
|
||||
if(commandGuidance.size() == 0)
|
||||
{ return G4String("...Title not available..."); }
|
||||
else
|
||||
{ return commandGuidance[0]; }
|
||||
if(commandGuidance.size() == 0)
|
||||
{ return G4String("...Title not available..."); }
|
||||
else
|
||||
{ return commandGuidance[0]; }
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -213,6 +213,9 @@ class G4UIcommand
|
||||
G4int CheckNewValue(const char* newValue);
|
||||
|
||||
// --- the following is used by CheckNewValue() --------
|
||||
protected:
|
||||
using yystype = G4UItokenNum::yystype;
|
||||
using tokenNum = G4UItokenNum::tokenNum;
|
||||
private:
|
||||
G4int TypeCheck(const char* t);
|
||||
G4int RangeCheck(const char* t);
|
||||
|
||||
@@ -80,9 +80,9 @@ class G4UIcommandTree
|
||||
inline const G4String GetPathName() const
|
||||
{ return pathName; };
|
||||
inline G4int GetTreeEntry() const
|
||||
{ return tree.size(); };
|
||||
{ return G4int(tree.size()); };
|
||||
inline G4int GetCommandEntry() const
|
||||
{ return command.size(); };
|
||||
{ return G4int(command.size()); };
|
||||
inline G4UIcommandTree * GetTree(G4int i)
|
||||
{ return tree[i-1]; };
|
||||
inline G4UIcommandTree * GetTree(const char* comNameC)
|
||||
|
||||
@@ -228,7 +228,7 @@ class G4UImanager : public G4VStateDependent
|
||||
inline G4int GetVerboseLevel() const
|
||||
{ return verboseLevel; }
|
||||
inline G4int GetNumberOfHistory() const
|
||||
{ return histVec.size(); }
|
||||
{ return G4int(histVec.size()); }
|
||||
inline G4String GetPreviousCommand(G4int i) const
|
||||
{
|
||||
G4String st;
|
||||
|
||||
@@ -143,6 +143,9 @@ class G4UIparameter
|
||||
inline void SetGuidance(const char * theGuidance)
|
||||
{ parameterGuidance = theGuidance; }
|
||||
|
||||
protected:
|
||||
using yystype = G4UItokenNum::yystype;
|
||||
using tokenNum = G4UItokenNum::tokenNum;
|
||||
private:
|
||||
// --- the following is used by CheckNewValue() -------
|
||||
G4int TypeCheck(const char* newValue );
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#define G4UItokenNum_hh 1
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
enum tokenNum
|
||||
namespace G4UItokenNum
|
||||
{
|
||||
enum tokenNum
|
||||
{
|
||||
NONE = 0,
|
||||
IDENTIFIER = 257,
|
||||
@@ -55,7 +56,6 @@ enum tokenNum
|
||||
MINUS = 45
|
||||
};
|
||||
|
||||
|
||||
typedef struct yystype
|
||||
{
|
||||
tokenNum type;
|
||||
@@ -64,7 +64,7 @@ typedef struct yystype
|
||||
char C;
|
||||
G4String S;
|
||||
|
||||
yystype() : type(NONE), D(0.0), I(0), C(' '), S("")
|
||||
yystype() : type(tokenNum::NONE), D(0.0), I(0), C(' '), S("")
|
||||
{
|
||||
}
|
||||
G4bool operator==(const yystype& right) const
|
||||
@@ -86,5 +86,5 @@ typedef struct yystype
|
||||
*this=right;
|
||||
}
|
||||
} yystype;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user