Warning, file /include/Geant4/G4VInteractorManager.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #ifndef G4VINTERACTORMANAGER_HH
0031 #define G4VINTERACTORMANAGER_HH
0032
0033 #include "globals.hh"
0034
0035 #include <vector>
0036
0037 using G4Interactor = void*;
0038 using G4DispatchFunction = G4bool (*)(void*);
0039 using G4SecondaryLoopAction = void (*)();
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 class G4VInteractorManager
0052 {
0053 public:
0054 G4VInteractorManager();
0055 virtual ~G4VInteractorManager();
0056 void SetArguments(int, char**);
0057 char** GetArguments(int*);
0058 void SetMainInteractor(G4Interactor);
0059 G4Interactor GetMainInteractor();
0060 void AddDispatcher(G4DispatchFunction);
0061 void RemoveDispatcher(G4DispatchFunction);
0062 void AddSecondaryLoopPreAction(G4SecondaryLoopAction);
0063 void AddSecondaryLoopPostAction(G4SecondaryLoopAction);
0064 void AddShell(G4Interactor);
0065 void RemoveShell(G4Interactor);
0066 void EnableSecondaryLoop();
0067 void DisableSecondaryLoop();
0068 void SecondaryLoopPreActions();
0069 void SecondaryLoopPostActions();
0070 void RequireExitSecondaryLoop(int);
0071 void DispatchEvent(void*);
0072 virtual void SecondaryLoop();
0073 int GetExitSecondaryLoopCode();
0074 void PutStringInResourceDatabase(char*);
0075 virtual G4bool Inited() = 0;
0076 virtual void* GetEvent() = 0;
0077 virtual void FlushAndWaitExecution() = 0;
0078 void SetParentInteractor(G4Interactor);
0079 G4Interactor GetParentInteractor();
0080 void SetCreatedInteractor(G4Interactor);
0081 G4Interactor GetCreatedInteractor();
0082 void SetCreationString(char*);
0083 char* GetCreationString();
0084
0085 private:
0086 int argc;
0087 char** argv;
0088 G4Interactor mainInteractor;
0089 std::vector<G4DispatchFunction> dispatchers;
0090 std::vector<G4SecondaryLoopAction> preActions;
0091 std::vector<G4SecondaryLoopAction> postActions;
0092 std::vector<G4Interactor> shells;
0093 G4bool secondaryLoopEnabled;
0094 G4bool alreadyInSecondaryLoop;
0095 int exitSecondaryLoop;
0096 G4Interactor parentInteractor;
0097 G4Interactor createdInteractor;
0098 char* creationString;
0099 };
0100
0101 #define OGL_EXIT_CODE 1
0102 #define OIV_EXIT_CODE 2
0103 #define XO_EXIT_CODE 3
0104
0105 #endif