Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIparameter.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIparameter.hh,v 1.2.4.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
@@ -24,13 +24,33 @@
|
||||
|
||||
#include "G4UItokenNum.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class represents a parameter which will be taken by a G4UIcommand
|
||||
// object. In case a command is defined by constructing G4UIcmdXXX class,
|
||||
// it automatically creates necessary parameter objects, thus the user needs
|
||||
// not to create parameter object(s) by him/herself. In case the user wants
|
||||
// to create a command directly instansiated by G4UIcommand class, he/she
|
||||
// must create parameter object(s) by him/herself.
|
||||
|
||||
class G4UIparameter
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIparameter();
|
||||
G4UIparameter(char theType);
|
||||
G4UIparameter(const char * theName, char theType, G4bool theOmittable);
|
||||
// Constructors, where "theName" is the name of the parameter which will
|
||||
// be used by the range checking, "theType" is the type of the parameter
|
||||
// (currently "b" (boolean), "i" (integer), "d" (double), and "s" (string)
|
||||
// are supported), and "theOmittable" is a boolean flag to set whether
|
||||
// the user of the command can ommit the parameter or not. If "theOmittable"
|
||||
// is true, the default value must be given.
|
||||
~G4UIparameter();
|
||||
// Destructor. When a command is destructed, the delete operator(s) for
|
||||
// associating parameter(s) are AUTOMATICALLY invoked. Thus the user needs
|
||||
// NOT to invoke this by him/herself.
|
||||
|
||||
public:
|
||||
int operator==(const G4UIparameter &right) const;
|
||||
int operator!=(const G4UIparameter &right) const;
|
||||
|
||||
@@ -48,22 +68,27 @@ class G4UIparameter
|
||||
G4bool currentAsDefaultFlag;
|
||||
G4int widget;
|
||||
|
||||
public:
|
||||
// defaultValue
|
||||
public: // with description
|
||||
inline void SetDefaultValue(const char * theDefaultValue)
|
||||
{ defaultValue = theDefaultValue; }
|
||||
void SetDefaultValue(G4int theDefaultValue);
|
||||
void SetDefaultValue(G4double theDefaultValue);
|
||||
// These methods set the default value of the parameter.
|
||||
public:
|
||||
inline G4String GetDefaultValue() const
|
||||
{ return defaultValue; }
|
||||
|
||||
// parameterType
|
||||
inline char GetParameterType() const
|
||||
{ return parameterType; }
|
||||
|
||||
// parameterRange
|
||||
public: // with description
|
||||
inline void SetParameterRange(const char * theRange)
|
||||
{ parameterRange = theRange; }
|
||||
// Defines the range the parameter can take.
|
||||
// The variable name appear in the range expression must be same
|
||||
// as the name of the parameter.
|
||||
// All the C++ syntax of relational operators are allowed for the
|
||||
// range expression.
|
||||
public:
|
||||
inline G4String GetParameterRange() const
|
||||
{ return parameterRange; }
|
||||
|
||||
@@ -73,9 +98,12 @@ class G4UIparameter
|
||||
inline G4String GetParameterName() const
|
||||
{ return parameterName; }
|
||||
|
||||
// parameterCandidates
|
||||
public: // with description
|
||||
inline void SetParameterCandidates(const char * theString)
|
||||
{ parameterCandidate = theString; }
|
||||
// This method is meaningful if the type of the parameter is string.
|
||||
// The candidates listed in the argument must be separated by space(s).
|
||||
public:
|
||||
inline G4String GetParameterCandidates() const
|
||||
{ return parameterCandidate; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user