ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4UIcommandTree.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4UIcommandTree.hh
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//
28
29
#ifndef G4UIcommandTree_h
30
#define G4UIcommandTree_h 1
31
32
33
#include "
G4UIcommand.hh
"
34
#include "
globals.hh
"
35
#include <vector>
36
37
// class description:
38
//
39
// This class is exclusively used by G4UImanager for handling the
40
// tree structure of the commands. The user MUST NOT construct/use
41
// this class object.
42
43
class
G4UIcommandTree
44
{
45
public
:
46
G4UIcommandTree
();
47
G4UIcommandTree
(
const
char
* thePathName);
48
~G4UIcommandTree
();
49
G4bool
operator==
(
const
G4UIcommandTree
&
right
)
const
;
50
G4bool
operator!=
(
const
G4UIcommandTree
&right)
const
;
51
52
public
:
53
void
AddNewCommand
(
G4UIcommand
* newCommand,
G4bool
workerThreadOnly=
false
);
54
void
RemoveCommand
(
G4UIcommand
* aCommand,
G4bool
workerThreadOnly=
false
);
55
G4UIcommand
*
FindPath
(
const
char
* commandPath)
const
;
56
G4UIcommandTree
*
FindCommandTree
(
const
char
* commandPath);
57
G4String
CompleteCommandPath
(
const
G4String
& commandPath);
58
G4String
GetFirstMatchedString
(
const
G4String
&,
const
G4String
&)
const
;
59
// Complete most available caracters in common into command path in the command line
60
// given
61
62
void
List
()
const
;
63
void
ListCurrent
()
const
;
64
void
ListCurrentWithNum
()
const
;
65
void
CreateHTML
();
66
67
private
:
68
G4String
CreateFileName
(
const
char
* pName);
69
G4String
ModStr
(
const
char
* strS);
70
71
std::vector<G4UIcommand*>
command
;
72
std::vector<G4UIcommandTree*>
tree
;
73
G4UIcommand
*
guidance
;
74
G4String
pathName
;
75
G4bool
broadcastCommands
;
76
77
public
:
78
inline
const
G4UIcommand
*
GetGuidance
()
const
79
{
return
guidance
; };
80
inline
const
G4String
GetPathName
()
const
81
{
return
pathName
; };
82
inline
G4int
GetTreeEntry
()
const
83
{
return
G4int
(
tree
.size()); };
84
inline
G4int
GetCommandEntry
()
const
85
{
return
G4int
(
command
.size()); };
86
inline
G4UIcommandTree
*
GetTree
(
G4int
i)
87
{
return
tree
[i-1]; };
88
inline
G4UIcommandTree
*
GetTree
(
const
char
* comNameC)
89
{
90
G4String
comName = comNameC;
91
for
(
size_t
i=0; i <
tree
.size(); i++)
92
{
93
if
( comName ==
tree
[i]->
GetPathName
() )
94
{
return
tree
[i]; }
95
}
96
return
NULL;
97
};
98
inline
G4UIcommand
*
GetCommand
(
G4int
i)
99
{
return
command
[i-1]; };
100
inline
const
G4String
GetTitle
()
const
101
{
102
if
(
guidance
==NULL)
103
{
return
G4String
(
"...Title not available..."
); }
104
else
105
{
return
guidance
->
GetTitle
(); }
106
};
107
108
};
109
110
#endif
111
geant4
tree
geant4-10.6-release
source
intercoms
include
G4UIcommandTree.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:21
using
1.8.2 with
ECCE GitHub integration