Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StateManager.hh 110286 2018-05-18 09:40:01Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -61,85 +60,69 @@
|
||||
class G4StateManager
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public: // with description
|
||||
|
||||
static G4StateManager* GetStateManager();
|
||||
// The G4StateManager class is a singleton class and the pointer
|
||||
// to the only one existing object can be obtained by this static
|
||||
// method.
|
||||
static G4StateManager* GetStateManager();
|
||||
// The G4StateManager class is a singleton class and the pointer
|
||||
// to the only one existing object can be obtained by this static
|
||||
// method.
|
||||
|
||||
protected:
|
||||
~G4StateManager();
|
||||
|
||||
G4StateManager();
|
||||
const G4ApplicationState& GetCurrentState() const;
|
||||
// Returns the current state
|
||||
const G4ApplicationState& GetPreviousState() const;
|
||||
// Returns the previous state
|
||||
G4bool SetNewState(const G4ApplicationState& requestedState);
|
||||
// Set Geant4 to a new state.
|
||||
// In case the request is irregal, false will be returned
|
||||
// and the state of Geant4 will not be changed.
|
||||
G4bool SetNewState(const G4ApplicationState& requestedState,
|
||||
const char* msg);
|
||||
// Set Geant4 to a new state.
|
||||
// In case the request is irregal, false will be returned
|
||||
// and the state of Geant4 will not be changed.
|
||||
// "msg" is information associating to this state change
|
||||
G4bool RegisterDependent(G4VStateDependent* aDependent,G4bool bottom=false);
|
||||
// Register a concrete class of G4VStateDependent.
|
||||
// Registered concrete classes will be notified via
|
||||
// G4VStateDependent::Notify() method when the state of Geant4 changes.
|
||||
// False will be returned if registration fails.
|
||||
G4bool DeregisterDependent(G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// False will be returned if aDependent has not been registered.
|
||||
G4VStateDependent* RemoveDependent(const G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// Removed pointer is returned.
|
||||
G4String GetStateString(const G4ApplicationState& aState) const;
|
||||
// Utility method which returns a string of the state name.
|
||||
|
||||
public:
|
||||
inline void SetSuppressAbortion(G4int i);
|
||||
inline G4int GetSuppressAbortion() const;
|
||||
inline const char* GetMessage() const;
|
||||
inline void SetExceptionHandler(G4VExceptionHandler* eh);
|
||||
inline G4VExceptionHandler* GetExceptionHandler() const;
|
||||
static void SetVerboseLevel(G4int val);
|
||||
|
||||
~G4StateManager();
|
||||
private:
|
||||
|
||||
public: // with description
|
||||
G4StateManager();
|
||||
G4StateManager(const G4StateManager &right);
|
||||
G4StateManager& operator=(const G4StateManager &right);
|
||||
G4int operator==(const G4StateManager &right) const;
|
||||
G4int operator!=(const G4StateManager &right) const;
|
||||
|
||||
G4ApplicationState GetCurrentState() const;
|
||||
// Returns the current state
|
||||
G4ApplicationState GetPreviousState() const;
|
||||
// Returns the previous state
|
||||
G4bool SetNewState(G4ApplicationState requestedState);
|
||||
// Set Geant4 to a new state.
|
||||
// In case the request is irregal, false will be returned
|
||||
// and the state of Geant4 will not be changed.
|
||||
G4bool SetNewState(G4ApplicationState requestedState, const char* msg);
|
||||
// Set Geant4 to a new state.
|
||||
// In case the request is irregal, false will be returned
|
||||
// and the state of Geant4 will not be changed.
|
||||
// "msg" is information associating to this state change
|
||||
G4bool RegisterDependent(G4VStateDependent* aDependent,G4bool bottom=false);
|
||||
// Register a concrete class of G4VStateDependent.
|
||||
// Registered concrete classes will be notified via
|
||||
// G4VStateDependent::Notify() method when the state of Geant4 changes.
|
||||
// False will be returned if registration fails.
|
||||
G4bool DeregisterDependent(G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// False will be returned if aDependent has not been registered.
|
||||
G4VStateDependent* RemoveDependent(const G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// Removed pointer is returned.
|
||||
G4String GetStateString(G4ApplicationState aState) const;
|
||||
// Utility method which returns a string of the state name.
|
||||
private:
|
||||
|
||||
public:
|
||||
|
||||
inline void SetSuppressAbortion(G4int i);
|
||||
inline G4int GetSuppressAbortion() const;
|
||||
inline const char* GetMessage() const;
|
||||
inline void SetExceptionHandler(G4VExceptionHandler* eh);
|
||||
inline G4VExceptionHandler* GetExceptionHandler() const;
|
||||
static void SetVerboseLevel(G4int val);
|
||||
|
||||
//void Pause();
|
||||
//void Pause(const char* msg);
|
||||
//void Pause(G4String msg);
|
||||
//// G4UIsession::pauseSession() will be invoked. The argument string "msg"
|
||||
//// will be used as a prompt characters if the session is non-graphical.
|
||||
//// This method can be invoked by any user action class during the event
|
||||
//// loop. After the user's interactions, control goes back to the caller.
|
||||
|
||||
private:
|
||||
|
||||
G4StateManager(const G4StateManager &right);
|
||||
G4StateManager& operator=(const G4StateManager &right);
|
||||
G4int operator==(const G4StateManager &right) const;
|
||||
G4int operator!=(const G4StateManager &right) const;
|
||||
|
||||
private:
|
||||
|
||||
static G4ThreadLocal G4StateManager* theStateManager;
|
||||
G4ApplicationState theCurrentState;
|
||||
G4ApplicationState thePreviousState;
|
||||
std::vector<G4VStateDependent*> theDependentsList;
|
||||
G4VStateDependent* theBottomDependent;
|
||||
G4int suppressAbortion;
|
||||
const char* msgptr;
|
||||
G4VExceptionHandler* exceptionHandler;
|
||||
static G4int verboseLevel;
|
||||
static G4ThreadLocal G4StateManager* theStateManager;
|
||||
G4ApplicationState theCurrentState;
|
||||
G4ApplicationState thePreviousState;
|
||||
std::vector<G4VStateDependent*> theDependentsList;
|
||||
G4VStateDependent* theBottomDependent;
|
||||
G4int suppressAbortion;
|
||||
const char* msgptr;
|
||||
G4VExceptionHandler* exceptionHandler;
|
||||
static G4int verboseLevel;
|
||||
};
|
||||
|
||||
#include "G4StateManager.icc"
|
||||
|
||||
Reference in New Issue
Block a user