Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
global
include
TG4StateManager.h
Go to the documentation of this file.
1
#ifndef TG4_STATE_MANAGER_H
2
#define TG4_STATE_MANAGER_H
3
4
//------------------------------------------------
5
// The Geant4 Virtual Monte Carlo package
6
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7
// All rights reserved.
8
//
9
// For the licensing terms see geant4_vmc/LICENSE.
10
// Contact: root-vmc@cern.ch
11
//-------------------------------------------------
12
17
18
#include "
TG4ApplicationState.h
"
19
#include "
TG4Verbose.h
"
20
21
#include "globals.hh"
22
23
class
TG4StateManager
;
24
29
30
class
TG4StateManager
:
public
TG4Verbose
31
{
32
public
:
33
TG4StateManager
();
34
virtual
~TG4StateManager
();
35
36
// static access method
37
static
TG4StateManager
*
Instance
();
38
static
G4String
GetStateName
(
TG4ApplicationState
state);
39
40
// methods
41
void
SetNewState
(
TG4ApplicationState
state);
42
TG4ApplicationState
GetCurrentState
()
const
;
43
TG4ApplicationState
GetPreviousState
()
const
;
44
45
private
:
47
TG4StateManager
(
const
TG4StateManager
& right);
49
TG4StateManager
&
operator=
(
const
TG4StateManager
& right);
50
51
// static data members
52
static
G4ThreadLocal
TG4StateManager
*
fgInstance
;
53
54
// data members
55
TG4ApplicationState
fCurrentState
;
56
TG4ApplicationState
fPreviousState
;
57
};
58
59
// inline methods
60
61
inline
TG4StateManager
*
TG4StateManager::Instance
()
62
{
64
return
fgInstance
;
65
}
66
67
inline
TG4ApplicationState
TG4StateManager::GetCurrentState
()
const
68
{
70
return
fCurrentState
;
71
}
72
73
inline
TG4ApplicationState
TG4StateManager::GetPreviousState
()
const
74
{
76
return
fPreviousState
;
77
}
78
79
#endif
// TG4_STATE_MANAGER_H
TG4ApplicationState.h
Definition of the enumeration TG4ApplicationState.
TG4Verbose.h
Definition of the TG4Verbose class.
TG4StateManager
The manager class for application state.
Definition
TG4StateManager.h:31
TG4StateManager::GetPreviousState
TG4ApplicationState GetPreviousState() const
Definition
TG4StateManager.h:73
TG4StateManager::fgInstance
static G4ThreadLocal TG4StateManager * fgInstance
this instance
Definition
TG4StateManager.h:52
TG4StateManager::TG4StateManager
TG4StateManager()
Definition
TG4StateManager.cxx:49
TG4StateManager::fCurrentState
TG4ApplicationState fCurrentState
the current application state
Definition
TG4StateManager.h:55
TG4StateManager::GetStateName
static G4String GetStateName(TG4ApplicationState state)
Definition
TG4StateManager.cxx:21
TG4StateManager::SetNewState
void SetNewState(TG4ApplicationState state)
Definition
TG4StateManager.cxx:74
TG4StateManager::fPreviousState
TG4ApplicationState fPreviousState
the previous application state
Definition
TG4StateManager.h:56
TG4StateManager::Instance
static TG4StateManager * Instance()
Definition
TG4StateManager.h:61
TG4StateManager::~TG4StateManager
virtual ~TG4StateManager()
Definition
TG4StateManager.cxx:66
TG4StateManager::GetCurrentState
TG4ApplicationState GetCurrentState() const
Definition
TG4StateManager.h:67
TG4StateManager::operator=
TG4StateManager & operator=(const TG4StateManager &right)
Not implemented.
TG4StateManager::TG4StateManager
TG4StateManager(const TG4StateManager &right)
Not implemented.
TG4Verbose::TG4Verbose
TG4Verbose(const G4String &cmdName)
Definition
TG4Verbose.cxx:24
TG4ApplicationState
TG4ApplicationState
Enumeration for application states.
Definition
TG4ApplicationState.h:22
Generated on
for Geant4 VMC by
1.17.0