Import Geant4 10.5.1 source tree
This commit is contained in:
@@ -16,6 +16,24 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
12 April, 2019 M. Asai (intercoms-V10-04-06)
|
||||
- Fix comments in this History file and G4UIparameter.hh.
|
||||
|
||||
29 March, 2019 M. Asai (intercoms-V10-04-05)
|
||||
- G4UIcommand::RangeCheck() : fixing a misbehavior caused in case
|
||||
string-type parameter comes prior to numeric-type parameters.
|
||||
|
||||
13 March, 2019 M. Asai
|
||||
- Introducing G4UIparameter::SetDefaultUnit() method that simplifies
|
||||
the definition of a unit parameter.
|
||||
|
||||
11 March, 2019 G. Cosmo
|
||||
- Fixed typos in printouts in G4LocalThreadCoutMessenger,
|
||||
G4UImanager and G4UIcontrolMessenger.
|
||||
|
||||
31 January, 2019 I. Hrivnacova
|
||||
- Merged GitHub PR #4: all Boolean operators now return G4bool.
|
||||
|
||||
23 July, 2018 M. Asai (intercoms-V10-04-04)
|
||||
- G4UIcommand.cc : adding comparison of two variables. Addressing to
|
||||
Bug report #2068.
|
||||
|
||||
@@ -46,8 +46,8 @@ class G4UIaliasList
|
||||
~G4UIaliasList();
|
||||
|
||||
private:
|
||||
G4int operator==(const G4UIaliasList &right) const;
|
||||
G4int operator!=(const G4UIaliasList &right) const;
|
||||
G4bool operator==(const G4UIaliasList &right) const;
|
||||
G4bool operator!=(const G4UIaliasList &right) const;
|
||||
|
||||
public:
|
||||
void RemoveAlias(const char* aliasName);
|
||||
|
||||
@@ -63,8 +63,8 @@ class G4UIcommand
|
||||
public:
|
||||
virtual ~G4UIcommand();
|
||||
|
||||
G4int operator==(const G4UIcommand &right) const;
|
||||
G4int operator!=(const G4UIcommand &right) const;
|
||||
G4bool operator==(const G4UIcommand &right) const;
|
||||
G4bool operator!=(const G4UIcommand &right) const;
|
||||
|
||||
virtual G4int DoIt(G4String parameterList);
|
||||
G4String GetCurrentValue();
|
||||
|
||||
@@ -46,8 +46,8 @@ class G4UIcommandTree
|
||||
G4UIcommandTree();
|
||||
G4UIcommandTree(const char * thePathName);
|
||||
~G4UIcommandTree();
|
||||
G4int operator==(const G4UIcommandTree &right) const;
|
||||
G4int operator!=(const G4UIcommandTree &right) const;
|
||||
G4bool operator==(const G4UIcommandTree &right) const;
|
||||
G4bool operator!=(const G4UIcommandTree &right) const;
|
||||
|
||||
public:
|
||||
void AddNewCommand(G4UIcommand * newCommand, G4bool workerThreadOnly=false);
|
||||
|
||||
@@ -69,8 +69,8 @@ class G4UImanager : public G4VStateDependent
|
||||
private:
|
||||
G4UImanager(const G4UImanager &right);
|
||||
const G4UImanager & operator=(const G4UImanager &right);
|
||||
G4int operator==(const G4UImanager &right) const;
|
||||
G4int operator!=(const G4UImanager &right) const;
|
||||
G4bool operator==(const G4UImanager &right) const;
|
||||
G4bool operator!=(const G4UImanager &right) const;
|
||||
|
||||
public: // with description
|
||||
G4String GetCurrentValues(const char * aCommand);
|
||||
|
||||
@@ -61,8 +61,8 @@ class G4UIparameter
|
||||
// NOT to invoke this by him/herself.
|
||||
|
||||
public:
|
||||
G4int operator==(const G4UIparameter &right) const;
|
||||
G4int operator!=(const G4UIparameter &right) const;
|
||||
G4bool operator==(const G4UIparameter &right) const;
|
||||
G4bool operator!=(const G4UIparameter &right) const;
|
||||
|
||||
G4int CheckNewValue(const char* newValue);
|
||||
void List();
|
||||
@@ -84,6 +84,12 @@ class G4UIparameter
|
||||
void SetDefaultValue(G4int theDefaultValue);
|
||||
void SetDefaultValue(G4double theDefaultValue);
|
||||
// These methods set the default value of the parameter.
|
||||
void SetDefaultUnit(const char * theDefaultUnit);
|
||||
// This method can be used for a string-type parameter that is
|
||||
// used to specify a unit. This method is valid only for a
|
||||
// string-type parameter. With this set-method, not only the
|
||||
// default unit but also candidate units that belong to the
|
||||
// same unit category (a.k.a. dimension) as the default unit.
|
||||
public:
|
||||
inline G4String GetDefaultValue() const
|
||||
{ return defaultValue; }
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct yystype
|
||||
yystype() : type(NONE), D(0.0), I(0), C(' '), S("")
|
||||
{
|
||||
}
|
||||
G4int operator==(const yystype& right) const
|
||||
G4bool operator==(const yystype& right) const
|
||||
{
|
||||
return (this == &right)?1:0;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4LocalThreadCoutMessenger.hh"
|
||||
|
||||
@@ -96,7 +93,7 @@ G4LocalThreadCoutMessenger::G4LocalThreadCoutMessenger()
|
||||
ignoreCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
ignoreInitCmd = new G4UIcmdWithABool("/control/cout/ignoreInitializationCout",this);
|
||||
ignoreInitCmd->SetGuidance("Omit cout from threads during initialization, as they should be identical to the masther thread.");
|
||||
ignoreInitCmd->SetGuidance("Omit cout from threads during initialization, as they should be identical to the master thread.");
|
||||
ignoreInitCmd->SetGuidance("This command takes effect only if cout destination is screen without buffering.");
|
||||
ignoreInitCmd->SetGuidance("This command does not affect to cerr.");
|
||||
ignoreInitCmd->SetParameterName("IgnoreInit",true);
|
||||
|
||||
@@ -41,12 +41,12 @@ G4UIaliasList::~G4UIaliasList()
|
||||
delete value[i]; }
|
||||
}
|
||||
|
||||
G4int G4UIaliasList::operator==(const G4UIaliasList &right) const
|
||||
G4bool G4UIaliasList::operator==(const G4UIaliasList &right) const
|
||||
{
|
||||
return ( this == &right );
|
||||
}
|
||||
|
||||
G4int G4UIaliasList::operator!=(const G4UIaliasList &right) const
|
||||
G4bool G4UIaliasList::operator!=(const G4UIaliasList &right) const
|
||||
{
|
||||
return ( this != &right );
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ G4UIcommand::~G4UIcommand()
|
||||
parameter.clear();
|
||||
}
|
||||
|
||||
G4int G4UIcommand::operator==(const G4UIcommand &right) const
|
||||
G4bool G4UIcommand::operator==(const G4UIcommand &right) const
|
||||
{
|
||||
return ( commandPath == right.GetCommandPath() );
|
||||
}
|
||||
|
||||
G4int G4UIcommand::operator!=(const G4UIcommand &right) const
|
||||
G4bool G4UIcommand::operator!=(const G4UIcommand &right) const
|
||||
{
|
||||
return ( commandPath != right.GetCommandPath() );
|
||||
}
|
||||
@@ -662,8 +662,8 @@ RangeCheck(const char* t) {
|
||||
switch ( type ) {
|
||||
case 'D': is >> newVal[i].D; break;
|
||||
case 'I': is >> newVal[i].I; break;
|
||||
case 'S':
|
||||
case 'B':
|
||||
case 'S': is >> newVal[i].S; break;
|
||||
case 'B': is >> newVal[i].C; break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ G4UIcommandTree::~G4UIcommandTree()
|
||||
{ delete tree[i]; }
|
||||
}
|
||||
|
||||
G4int G4UIcommandTree::operator==(const G4UIcommandTree &right) const
|
||||
G4bool G4UIcommandTree::operator==(const G4UIcommandTree &right) const
|
||||
{
|
||||
return ( pathName == right.GetPathName() );
|
||||
}
|
||||
|
||||
G4int G4UIcommandTree::operator!=(const G4UIcommandTree &right) const
|
||||
G4bool G4UIcommandTree::operator!=(const G4UIcommandTree &right) const
|
||||
{
|
||||
return ( pathName != right.GetPathName() );
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ G4UIcontrolMessenger::G4UIcontrolMessenger()
|
||||
|
||||
macroPathCommand = new G4UIcmdWithAString("/control/macroPath",this);
|
||||
macroPathCommand->SetGuidance("Set macro search path"
|
||||
"with colon-separated list.");
|
||||
" with colon-separated list.");
|
||||
macroPathCommand->SetParameterName("path",false);
|
||||
|
||||
ExecuteCommand = new G4UIcmdWithAString("/control/execute",this);
|
||||
@@ -128,7 +128,7 @@ G4UIcontrolMessenger::G4UIcontrolMessenger()
|
||||
aliasCommand->SetGuidance("The string may contain one or more spaces,");
|
||||
aliasCommand->SetGuidance("the string must be enclosed by double quotes (\").");
|
||||
aliasCommand->SetGuidance("To use an alias, enclose the alias name with");
|
||||
aliasCommand->SetGuidance("parenthis \"{\" and \"}\".");
|
||||
aliasCommand->SetGuidance("parenthesis \"{\" and \"}\".");
|
||||
G4UIparameter* aliasNameParam = new G4UIparameter("aliasName",'s',false);
|
||||
aliasCommand->SetParameter(aliasNameParam);
|
||||
G4UIparameter* aliasValueParam = new G4UIparameter("aliasValue",'s',false);
|
||||
@@ -236,7 +236,7 @@ G4UIcontrolMessenger::G4UIcontrolMessenger()
|
||||
subtractCommand->SetToBeBroadcasted(false);
|
||||
|
||||
multiplyCommand = new G4UIcommand("/control/multiply",this);
|
||||
multiplyCommand->SetGuidance("Define a new alias as the multiplification of two values.");
|
||||
multiplyCommand->SetGuidance("Define a new alias as the multiplication of two values.");
|
||||
multiplyCommand->SetGuidance(" Syntax : <new_alias> <value1> <value2>");
|
||||
multiplyCommand->SetGuidance(" <new_alias> may be an already existing alias. If it is the case,");
|
||||
multiplyCommand->SetGuidance(" aliased value is alternated.");
|
||||
|
||||
@@ -176,9 +176,9 @@ G4UImanager::G4UImanager(const G4UImanager& ui)
|
||||
|
||||
const G4UImanager & G4UImanager::operator=(const G4UImanager &right)
|
||||
{ return right; }
|
||||
G4int G4UImanager::operator==(const G4UImanager &right) const
|
||||
G4bool G4UImanager::operator==(const G4UImanager &right) const
|
||||
{ return (this==&right); }
|
||||
G4int G4UImanager::operator!=(const G4UImanager &right) const
|
||||
G4bool G4UImanager::operator!=(const G4UImanager &right) const
|
||||
{ return (this!=&right); }
|
||||
|
||||
void G4UImanager::UseDoublePrecisionStr(G4bool val)
|
||||
@@ -423,7 +423,7 @@ G4String G4UImanager::SolveAlias(const char* aCmd)
|
||||
G4cerr << aCommand << G4endl;
|
||||
for(G4int i=0;i<ia;i++) G4cerr << " ";
|
||||
G4cerr << "^" << G4endl;
|
||||
G4cerr << "Unmatched alias parenthis -- command ignored" << G4endl;
|
||||
G4cerr << "Unmatched alias parenthesis -- command ignored" << G4endl;
|
||||
G4String nullStr;
|
||||
return nullStr;
|
||||
}
|
||||
|
||||
@@ -84,12 +84,12 @@ G4UIparameter::G4UIparameter(const char * theName, char theType, G4bool theOmitt
|
||||
G4UIparameter::~G4UIparameter()
|
||||
{ }
|
||||
|
||||
G4int G4UIparameter::operator==(const G4UIparameter &right) const
|
||||
G4bool G4UIparameter::operator==(const G4UIparameter &right) const
|
||||
{
|
||||
return ( this == &right );
|
||||
}
|
||||
|
||||
G4int G4UIparameter::operator!=(const G4UIparameter &right) const
|
||||
G4bool G4UIparameter::operator!=(const G4UIparameter &right) const
|
||||
{
|
||||
return ( this != &right );
|
||||
}
|
||||
@@ -128,7 +128,27 @@ void G4UIparameter::SetDefaultValue(G4double theDefaultValue)
|
||||
defaultValue = os.str();
|
||||
}
|
||||
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
void G4UIparameter::SetDefaultUnit(const char * theDefaultUnit)
|
||||
{
|
||||
char type = toupper( parameterType );
|
||||
if( type != 'S' )
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "This method can be used only for a string-type parameter that is used to specify a unit.\n"
|
||||
<< "This parameter <" << parameterName << "> is defined as ";
|
||||
switch(type) {
|
||||
case 'D': ed <<"double."; break;
|
||||
case 'I': ed <<"integer."; break;
|
||||
case 'B': ed <<"bool."; break;
|
||||
default: ed <<"undefined.";
|
||||
}
|
||||
G4Exception("G4UIparameter::SetDefaultUnit","INTERCOM2010",FatalException,ed);
|
||||
}
|
||||
SetDefaultValue(theDefaultUnit);
|
||||
SetParameterCandidates(G4UIcommand::UnitsList(G4UIcommand::CategoryOf(theDefaultUnit)));
|
||||
}
|
||||
|
||||
// ---------- CheckNewValue() related routines -----------
|
||||
#include <ctype.h>
|
||||
#include "G4UItokenNum.hh"
|
||||
|
||||
Reference in New Issue
Block a user