Warning, file /include/Geant4/G4UIcommandTree.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
0031
0032
0033
0034
0035
0036 #ifndef G4UIcommandTree_hh
0037 #define G4UIcommandTree_hh 1
0038
0039 #include "G4UIcommand.hh"
0040 #include "globals.hh"
0041
0042 #include <vector>
0043
0044 class G4UIcommandTree
0045 {
0046 public:
0047 G4UIcommandTree() = default;
0048 G4UIcommandTree(const char* thePathName);
0049
0050 ~G4UIcommandTree();
0051
0052 G4bool operator==(const G4UIcommandTree& right) const;
0053 G4bool operator!=(const G4UIcommandTree& right) const;
0054
0055 void AddNewCommand(G4UIcommand* newCommand, G4bool workerThreadOnly = false);
0056 void RemoveCommand(G4UIcommand* aCommand, G4bool workerThreadOnly = false);
0057 G4UIcommand* FindPath(const char* commandPath) const;
0058 G4UIcommandTree* FindCommandTree(const char* commandPath);
0059 G4String GetFirstMatchedString(const G4String&, const G4String&) const;
0060
0061
0062
0063 G4String CompleteCommandPath(const G4String& commandPath);
0064
0065 void List() const;
0066 void ListCurrent() const;
0067 void ListCurrentWithNum() const;
0068 void CreateHTML(const G4String& = "");
0069
0070 inline const G4UIcommand* GetGuidance() const { return guidance; }
0071 inline const G4String& GetPathName() const { return pathName; }
0072 inline G4int GetTreeEntry() const { return G4int(tree.size()); }
0073 inline G4int GetCommandEntry() const { return G4int(command.size()); }
0074 inline G4UIcommandTree* GetTree(G4int i) { return tree[i - 1]; }
0075 G4UIcommandTree* GetTree(const char* comNameC);
0076 inline G4UIcommand* GetCommand(G4int i) { return command[i - 1]; }
0077 inline const G4String GetTitle() const
0078 {
0079 return (guidance == nullptr) ? G4String("...Title not available...") : guidance->GetTitle();
0080 }
0081
0082 private:
0083 G4String CreateFileName(const char* pName);
0084 G4String ModStr(const char* strS);
0085
0086 private:
0087 std::vector<G4UIcommand*> command;
0088 std::vector<G4UIcommandTree*> tree;
0089 G4UIcommand* guidance = nullptr;
0090 G4String pathName;
0091 G4bool broadcastCommands = true;
0092 G4bool ifSort = false;
0093 G4int createHTMLTreeLevel = 0;
0094 };
0095
0096 #endif