Geant4-11
G4UIcommandTree.cc
Go to the documentation of this file.
1// ********************************************************************
2// * License and Disclaimer *
3// * *
4// * The Geant4 software is copyright of the Copyright Holders of *
5// * the Geant4 Collaboration. It is provided under the terms and *
6// * conditions of the Geant4 Software License, included in the file *
7// * LICENSE and available at http://cern.ch/geant4/license . These *
8// * include a list of copyright holders. *
9// * *
10// * Neither the authors of this software system, nor their employing *
11// * institutes,nor the agencies providing financial support for this *
12// * work make any representation or warranty, express or implied, *
13// * regarding this software system or assume any liability for its *
14// * use. Please see the license in the file LICENSE and URL above *
15// * for the full disclaimer and the limitation of liability. *
16// * *
17// * This code implementation is the result of the scientific and *
18// * technical work of the GEANT4 collaboration. *
19// * By using, copying, modifying or distributing the software (or *
20// * any work based on the software) you agree to acknowledge its *
21// * use in resulting scientific publications, and indicate your *
22// * acceptance of all terms of the Geant4 Software license. *
23// ********************************************************************
24//
25// G4UIcommandTree
26//
27// Author: Makoto Asai (SLAC), 1998
28// Midified: Makoto Asai (SLAC), 2021
29// Improve output HTML file layout and add option to sort
30// command/directory names in alphabetic order
31// --------------------------------------------------------------------
32
33#include "G4UIcommandTree.hh"
34#include "G4UIdirectory.hh"
35#include "G4StateManager.hh"
36#include "G4UImanager.hh"
37#include <fstream>
38#include "G4ios.hh"
39
40// --------------------------------------------------------------------
42{
43}
44
45// --------------------------------------------------------------------
46G4UIcommandTree::G4UIcommandTree(const char* thePathName)
47{
48 pathName = thePathName;
49}
50
51// --------------------------------------------------------------------
53{
54 G4int i;
55 G4int n_treeEntry = tree.size();
56 for(i = 0; i < n_treeEntry; ++i)
57 {
58 delete tree[i];
59 }
60}
61
62// --------------------------------------------------------------------
64{
65 return (pathName == right.GetPathName());
66}
67
68// --------------------------------------------------------------------
70{
71 return (pathName != right.GetPathName());
72}
73
74// --------------------------------------------------------------------
76 G4bool workerThreadOnly)
77{
78 G4String commandPath = newCommand->GetCommandPath();
79 G4String remainingPath = commandPath;
80 remainingPath.erase(0, pathName.length());
81 if(remainingPath.empty())
82 {
83 if(!guidance)
84 {
85 guidance = newCommand;
86 if(!(newCommand->ToBeBroadcasted()))
87 { broadcastCommands = false; }
88 if(workerThreadOnly)
89 { newCommand->SetWorkerThreadOnly(); }
90 }
91 return;
92 }
93
94 if(guidance)
95 {
96 G4UIdirectory* dir = static_cast<G4UIdirectory*>(guidance);
97 ifSort = dir->IfSort();
98 }
99 G4int i = remainingPath.find('/');
100 if(i == G4int(std::string::npos))
101 {
102 // Adding a new command to this directory
103 G4int n_commandEntry = command.size();
104 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
105 {
106 if(remainingPath == command[i_thCommand]->GetCommandName())
107 {
108 // a command of same name has already defined. do nothing and return.
110 {
112 ed << "Command <" << commandPath << "> already exist. New command is not added.";
113 G4Exception("G4UIcommandTree::AddNewCommand","UI_ComTree_001",
114 //FatalException,
116 ed);
117 }
118 return;
119 }
120 }
122 { newCommand->SetToBeBroadcasted(false); }
123 if(workerThreadOnly)
124 { newCommand->SetWorkerThreadOnly(); }
125 if(ifSort)
126 {
127 auto j = command.begin();
128 for(; j != command.end(); ++j) {
129 if (newCommand->GetCommandPath() < (*j)->GetCommandPath()) { break; }
130 }
131 command.insert(j,newCommand);
132 }
133 else
134 { command.push_back(newCommand); }
135 return;
136 }
137 else
138 {
139 // Adding a new command to a sub-directory
140 G4String nextPath = pathName;
141 nextPath.append(remainingPath.substr(0, i + 1));
142 G4int n_treeEntry = tree.size();
143 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
144 {
145 if(nextPath == tree[i_thTree]->GetPathName())
146 {
148 newCommand->SetToBeBroadcasted(false);
149 tree[i_thTree]->AddNewCommand(newCommand, workerThreadOnly);
150 return;
151 }
152 }
153 // Creating a new sub-directory
154 G4UIcommandTree* newTree = new G4UIcommandTree(nextPath);
155 if(ifSort)
156 {
157 auto j = tree.begin();
158 for(; j != tree.end(); ++j) {
159 if (newTree->GetPathName() < (*j)->GetPathName()) { break; }
160 }
161 tree.insert(j,newTree);
162 }
163 else
164 { tree.push_back(newTree); }
166 { newCommand->SetToBeBroadcasted(false); }
167 // In case a new sub-directry is created with a new G4UIdirectory
168 // (most-likely this is the case), inherit the sort flag
169 newCommand->SetDefaultSortFlag(ifSort);
170 newTree->AddNewCommand(newCommand, workerThreadOnly);
171 return;
172 }
173}
174
175// --------------------------------------------------------------------
177 G4bool workerThreadOnly)
178{
179 if(workerThreadOnly && !(aCommand->IsWorkerThreadOnly()))
180 return;
181 G4String commandPath = aCommand->GetCommandPath();
182 G4String remainingPath = commandPath;
183 remainingPath.erase(0, pathName.length());
184 if(remainingPath.empty())
185 {
186 guidance = nullptr;
187 }
188 else
189 {
190 G4int i = remainingPath.find('/');
191 if(i == G4int(std::string::npos))
192 {
193 // Find command
194 G4int n_commandEntry = command.size();
195 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
196 {
197 if(remainingPath == command[i_thCommand]->GetCommandName())
198 {
199 command.erase(command.begin() + i_thCommand);
200 break;
201 }
202 }
203 }
204 else
205 {
206 // Find path
207 G4String nextPath = pathName;
208 nextPath.append(remainingPath.substr(0, i + 1));
209 G4int n_treeEntry = tree.size();
210 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
211 {
212 if(nextPath == tree[i_thTree]->GetPathName())
213 {
214 tree[i_thTree]->RemoveCommand(aCommand);
215 G4int n_commandRemain = tree[i_thTree]->GetCommandEntry();
216 G4int n_treeRemain = tree[i_thTree]->GetTreeEntry();
217 if(n_commandRemain == 0 && n_treeRemain == 0)
218 {
219 G4UIcommandTree* emptyTree = tree[i_thTree];
220 tree.erase(tree.begin() + i_thTree);
221 delete emptyTree;
222 }
223 break;
224 }
225 }
226 }
227 }
228}
229
230// --------------------------------------------------------------------
231G4UIcommand* G4UIcommandTree::FindPath(const char* commandPath) const
232{
233 // This function tries to match a command name
234
235 G4String remainingPath = commandPath;
236 if(remainingPath.find(pathName) == std::string::npos)
237 {
238 return nullptr;
239 }
240 remainingPath.erase(0, pathName.length());
241 G4int i = remainingPath.find('/');
242 if(i == G4int(std::string::npos))
243 {
244 // Find command
245 G4int n_commandEntry = command.size();
246 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
247 {
248 if(remainingPath == command[i_thCommand]->GetCommandName())
249 {
250 return command[i_thCommand];
251 }
252 }
253 }
254 else
255 {
256 // Find path
257 G4String nextPath = pathName;
258 nextPath.append(remainingPath.substr(0, i + 1));
259 G4int n_treeEntry = tree.size();
260 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
261 {
262 if(nextPath == tree[i_thTree]->GetPathName())
263 {
264 return tree[i_thTree]->FindPath(commandPath);
265 }
266 }
267 }
268 return nullptr;
269}
270
271// --------------------------------------------------------------------
273{
274 // Try to match a command or a path with the one given.
275 // @commandPath : command or path to match
276 // @return the commandTree found or nullptr if not
277
278 G4String remainingPath = commandPath;
279 if(remainingPath.find(pathName) == std::string::npos)
280 {
281 return nullptr;
282 }
283 remainingPath.erase(0, pathName.length());
284 G4int i = remainingPath.find('/');
285 if(i != G4int(std::string::npos))
286 {
287 // Find path
288 G4String nextPath = pathName;
289 nextPath.append(remainingPath.substr(0, i + 1));
290 G4int n_treeEntry = tree.size();
291 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
292 {
293 if(tree[i_thTree]->GetPathName() == commandPath)
294 {
295 return tree[i_thTree];
296 }
297 else if(nextPath == tree[i_thTree]->GetPathName())
298 {
299 return tree[i_thTree]->FindCommandTree(commandPath);
300 }
301 }
302 }
303 else
304 {
305 return this;
306 }
307 return nullptr;
308}
309
310// --------------------------------------------------------------------
312{
313 G4String pName = aCommandPath;
314 G4String remainingPath = aCommandPath;
315 G4String empty = "";
316 G4String matchingPath = empty;
317
318 // find the tree
319 auto jpre = pName.rfind('/');
320 if(jpre != G4String::npos)
321 pName.erase(jpre + 1);
322 G4UIcommandTree* aTree = FindCommandTree(pName);
323
324 if(!aTree)
325 {
326 return empty;
327 }
328
329 if(pName.find(pName) == std::string::npos)
330 return empty;
331
332 std::vector<G4String> paths;
333
334 // list matched directories/commands
335 G4String strtmp;
336 G4int nMatch = 0;
337
338 G4int Ndir = aTree->GetTreeEntry();
339 G4int Ncmd = aTree->GetCommandEntry();
340
341 // directory ...
342 for(G4int idir = 1; idir <= Ndir; ++idir)
343 {
344 G4String fpdir = aTree->GetTree(idir)->GetPathName();
345 // matching test
346 if(fpdir.find(remainingPath, 0) == 0)
347 {
348 if(nMatch == 0)
349 {
350 matchingPath = fpdir;
351 }
352 else
353 {
354 matchingPath = GetFirstMatchedString(fpdir, matchingPath);
355 }
356 ++nMatch;
357 paths.push_back(fpdir);
358 }
359 }
360
361 if(paths.size() >= 2)
362 {
363 G4cout << "Matching directories :" << G4endl;
364 for(unsigned int i_thCommand = 0; i_thCommand < paths.size(); ++i_thCommand)
365 {
366 G4cout << paths[i_thCommand] << G4endl;
367 }
368 }
369
370 // command ...
371 std::vector<G4String> commands;
372
373 for(G4int icmd = 1; icmd <= Ncmd; ++icmd)
374 {
375 G4String fpcmd =
376 aTree->GetPathName() + aTree->GetCommand(icmd)->GetCommandName();
377 // matching test
378 if(fpcmd.find(remainingPath, 0) == 0)
379 {
380 if(nMatch == 0)
381 {
382 matchingPath = fpcmd + " ";
383 }
384 else
385 {
386 strtmp = fpcmd + " ";
387 matchingPath = GetFirstMatchedString(matchingPath, strtmp);
388 }
389 nMatch++;
390 commands.push_back(fpcmd + " ");
391 }
392 }
393
394 if(commands.size() >= 2)
395 {
396 G4cout << "Matching commands :" << G4endl;
397 for(unsigned int i_thCommand = 0; i_thCommand < commands.size();
398 ++i_thCommand)
399 {
400 G4cout << commands[i_thCommand] << G4endl;
401 }
402 }
403
404 return matchingPath;
405}
406
407// --------------------------------------------------------------------
409 const G4String& str2) const
410{
411 G4int nlen1 = str1.length();
412 G4int nlen2 = str2.length();
413
414 G4int nmin = nlen1 < nlen2 ? nlen1 : nlen2;
415
416 G4String strMatched;
417 for(size_t i = 0; G4int(i) < nmin; ++i)
418 {
419 if(str1[i] == str2[i])
420 {
421 strMatched += str1[i];
422 }
423 else
424 {
425 break;
426 }
427 }
428
429 return strMatched;
430}
431
432// --------------------------------------------------------------------
434{
435 G4cout << "Command directory path : " << pathName << G4endl;
436 if(guidance != nullptr)
437 guidance->List();
438 G4cout << " Sub-directories : " << G4endl;
439 G4int n_treeEntry = tree.size();
440 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
441 {
442 G4cout << " " << tree[i_thTree]->GetPathName();
443 if(tree[i_thTree]->GetGuidance() &&
444 tree[i_thTree]->GetGuidance()->IsWorkerThreadOnly())
445 {
446 G4cout << " @ ";
447 }
448 else
449 {
450 G4cout << " ";
451 }
452 G4cout << tree[i_thTree]->GetTitle() << G4endl;
453 }
454 G4cout << " Commands : " << G4endl;
455 G4int n_commandEntry = command.size();
456 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
457 {
458 G4cout << " " << command[i_thCommand]->GetCommandName();
459 if(command[i_thCommand]->IsWorkerThreadOnly())
460 {
461 G4cout << " @ ";
462 }
463 else
464 {
465 G4cout << " * ";
466 }
467 G4cout << command[i_thCommand]->GetTitle() << G4endl;
468 }
469}
470
471// --------------------------------------------------------------------
473{
474 G4cout << "Command directory path : " << pathName << G4endl;
475 if(guidance != nullptr)
476 guidance->List();
477 G4int i = 0;
478 G4cout << " Sub-directories : " << G4endl;
479 G4int n_treeEntry = tree.size();
480 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
481 {
482 ++i;
483 G4cout << " " << i << ") " << tree[i_thTree]->GetPathName() << " "
484 << tree[i_thTree]->GetTitle() << G4endl;
485 }
486 G4cout << " Commands : " << G4endl;
487 G4int n_commandEntry = command.size();
488 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
489 {
490 ++i;
491 G4cout << " " << i << ") " << command[i_thCommand]->GetCommandName()
492 << " * " << command[i_thCommand]->GetTitle() << G4endl;
493 }
494}
495
496// --------------------------------------------------------------------
498{
499 ListCurrent();
500 G4int n_commandEntry = command.size();
501 for(G4int i_thCommand = 0; i_thCommand < n_commandEntry; ++i_thCommand)
502 {
503 command[i_thCommand]->List();
504 }
505 G4int n_treeEntry = tree.size();
506 for(G4int i_thTree = 0; i_thTree < n_treeEntry; ++i_thTree)
507 {
508 tree[i_thTree]->List();
509 }
510}
511
512// --------------------------------------------------------------------
514{
515 G4String fn = pName;
516 G4int idxs;
517 while((idxs = fn.find("/")) != G4int(std::string::npos))
518 {
519 fn[idxs] = '_';
520 }
521 fn += ".html";
522 return fn;
523}
524
525// --------------------------------------------------------------------
527{
528 G4String sx;
529 G4String str = strS;
530 for(G4int i = 0; i < G4int(str.length()); ++i)
531 {
532 char c = str[i];
533 switch(c)
534 {
535 case '<':
536 sx += "&lt;";
537 break;
538 case '>':
539 sx += "&gt;";
540 break;
541 case '&':
542 sx += "&amp;";
543 break;
544 default:
545 sx += c;
546 }
547 }
548 return sx;
549}
550
551// --------------------------------------------------------------------
553{
554 G4String ofileName = CreateFileName(pathName);
555 std::ofstream oF(ofileName, std::ios::out);
556
557 oF << "<html><head><title>Commands in " << ModStr(pathName)
558 << "</title></head>" << G4endl;
559 oF << "<style> \
560 table,table td,table th { \
561 border:1px solid #eee \
562 } \
563 table td,table th { \
564 padding:5px 20px; \
565 line-height:1.3; \
566 text-align:inherit \
567 } \
568 a { \
569 color:#17a81a; \
570 text-decoration:none; \
571 transition-duration:0.3s \
572 } \
573 a:hover { \
574 color:#17a81a \
575 } \
576 table { \
577 border-collapse:collapse; \
578 border-spacing:0; \
579 margin-bottom:5px; \
580 } \
581 h1 { \
582 font-size:2.25em; \
583 font-weight:300; \
584 letter-spacing:-1px; \
585 line-height:1.15em; \
586 margin-bottom:0.5em; \
587 word-wrap:break-word \
588 } \
589 h2 { \
590 font-size:1.5em; \
591 font-weight:300; \
592 letter-spacing:-1px; \
593 line-height:1.15em; \
594 margin-bottom:0.5em; \
595 word-wrap:break-word \
596 } \
597 h3 { \
598 color:#26282a; \
599 font-weight:300; \
600 font-size:1.3em; \
601 padding:15px 0 15px 0; \
602 border-bottom:2px #eee solid; \
603 word-wrap:break-word \
604 } \
605 .sidebar { \
606 display:block; \
607 position:relative; \
608 position:sticky; \
609 float:left; \
610 -webkit-box-sizing:border-box; \
611 -moz-box-sizing:border-box; \
612 -ms-box-sizing:border-box; \
613 box-sizing:border-box; \
614 width:20%; \
615 padding-right:20px \
616 } \
617 .context { \
618 width:80%; \
619 display:inline-block; \
620 background-color:#fff; \
621 padding: 25px 35px 20px 30px; \
622 -webkit-box-sizing:border-box; \
623 -moz-box-sizing:border-box; \
624 -ms-box-sizing:border-box; \
625 box-sizing:border-box \
626 } \
627 </style>"<< G4endl;
628 oF << "<body bgcolor=\"#ffffff\">" << G4endl;
629
630 // Left Panel
631 if (createHTMLTreeLevel == 0 ) {
632 oF << "<div class=\"sidebar\">" << sideBar << "</div>" << G4endl;
633 }
634 // Right Panel
635 oF << "<div class=\"context\">";
636 oF << "<h1>" << ModStr(pathName) << "</h1>" << G4endl;
637
638 if(guidance != nullptr)
639 {
640 for(std::size_t i = 0; i < guidance->GetGuidanceEntries(); ++i)
641 {
642 oF << ModStr(guidance->GetGuidanceLine(i)) << "<br>" << G4endl;
643 }
644 }
645 if (tree.size() >0 ){
646 G4String menu = "";
647 G4String newSideBar = "";
648 menu += "<h2>Sub-directories </h2><table>";
649 newSideBar += "<h2><a href=\"" + ofileName + "\">Top level </a></h2><table>";
650 // Build menu short version
651 for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
652 {
653 newSideBar += "<tr><td><a href=\""
654 + CreateFileName(tree[i_thTree]->GetPathName()) + "\">"
655 + ModStr(tree[i_thTree]->GetPathName()) + "</a>";
656 }
657 // Build menu
658 for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
659 {
660 menu += "<tr><td><a href=\""
661 + CreateFileName(tree[i_thTree]->GetPathName()) + "\">"
662 + ModStr(tree[i_thTree]->GetPathName()) + "</a>";
663 menu += "</td><td>" + ModStr(tree[i_thTree]->GetTitle()) + "</tr>";
664 }
665 menu += "</table>";
666 newSideBar += "</table>";
667 for(std::size_t i_thTree = 0; i_thTree < tree.size(); ++i_thTree)
668 {
670 tree[i_thTree]->CreateHTML(newSideBar);
672 }
673 oF << menu << G4endl;
674 }
675
676 if (command.size() >0 ){
677 oF << "<h2>Commands </h2>" << G4endl;
678
679 // resume
680 oF << "<table>" << G4endl;
681 for(std::size_t i_thCommand = 0; i_thCommand < command.size(); ++i_thCommand)
682 {
683 G4UIcommand* cmd = command[i_thCommand];
684 oF << "<tr><td><a href=\"#c"<< i_thCommand << "\">"<< ModStr(cmd->GetCommandName());
685 oF << "</a></td></tr>" << G4endl;
686 }
687 oF << "</table>" << G4endl;
688 for(std::size_t i_thCommand = 0; i_thCommand < command.size(); ++i_thCommand)
689 {
690 G4UIcommand* cmd = command[i_thCommand];
691 oF << "<h3 id=\"c" << i_thCommand << "\">" << ModStr(cmd->GetCommandName());
692 if(cmd->GetParameterEntries() > 0)
693 {
694 for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
695 ++i_thParam)
696 {
697 oF << " [<i>"
698 << ModStr(cmd->GetParameter(i_thParam)->GetParameterName())
699 << "</i>]";
700 }
701 }
702 oF << "</h3>" << G4endl;
703 oF << "<p>" << G4endl;
704 for(std::size_t i = 0; i < cmd->GetGuidanceEntries(); ++i)
705 {
706 oF << ModStr(cmd->GetGuidanceLine(i)) << "<br>" << G4endl;
707 }
708 if(!(cmd->GetRange()).empty())
709 {
710 oF << "<p>Range : " << ModStr(cmd->GetRange()) << G4endl;
711 }
712 std::vector<G4ApplicationState>* availabelStateList = cmd->GetStateList();
713 if(availabelStateList->size() == 6)
714 {
715 oF << "<p>Available at all Geant4 states." << G4endl;
716 }
717 else
718 {
719 oF << "<p>Available Geant4 state(s) : ";
720 for(std::size_t ias = 0; ias < availabelStateList->size(); ++ias)
721 {
723 (*availabelStateList)[ias])
724 << " " << G4endl;
725 }
726 }
727 if(cmd->GetParameterEntries() > 0)
728 {
729 oF << "<p>Parameters<table border=1>" << G4endl;
730 for(std::size_t i_thParam = 0; i_thParam < cmd->GetParameterEntries();
731 ++i_thParam)
732 {
733 G4UIparameter* prm = cmd->GetParameter(i_thParam);
734 oF << "<tr><td>" << ModStr(prm->GetParameterName()) << G4endl;
735 oF << "<td>type " << prm->GetParameterType() << G4endl;
736 oF << "<td>";
737 if(prm->IsOmittable())
738 {
739 oF << "Omittable : ";
740 if(prm->GetCurrentAsDefault())
741 {
742 oF << "current value is used as the default value." << G4endl;
743 }
744 else
745 {
746 oF << "default value = " << prm->GetDefaultValue() << G4endl;
747 }
748 }
749 oF << "<td>";
750 if(!(prm->GetParameterRange()).empty())
751 {
752 oF << "Parameter range : " << ModStr(prm->GetParameterRange())
753 << G4endl;
754 }
755 else if(!(prm->GetParameterCandidates()).empty())
756 {
757 oF << "Parameter candidates : "
759 }
760 }
761 oF << "</table>" << G4endl;
762 }
763 }
764 }
765 oF << "</div></body></html>" << G4endl;
766 oF.close();
767}
768
769// --------------------------------------------------------------------
771{
772 G4String comName = comNameC;
773 for(std::size_t i = 0; i < tree.size(); ++i)
774 {
775 if(comName == tree[i]->GetPathName())
776 {
777 return tree[i];
778 }
779 }
780 return nullptr;
781}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4String GetStateString(const G4ApplicationState &aState) const
static G4StateManager * GetStateManager()
G4String CreateFileName(const char *pName)
G4bool operator!=(const G4UIcommandTree &right) const
G4int GetCommandEntry() const
const G4UIcommand * GetGuidance() const
std::vector< G4UIcommandTree * > tree
G4UIcommand * GetCommand(G4int i)
const G4String & GetPathName() const
G4int GetTreeEntry() const
G4UIcommandTree * GetTree(G4int i)
void List() const
G4bool operator==(const G4UIcommandTree &right) const
void AddNewCommand(G4UIcommand *newCommand, G4bool workerThreadOnly=false)
G4String ModStr(const char *strS)
G4UIcommandTree * FindCommandTree(const char *commandPath)
void ListCurrentWithNum() const
const G4String GetTitle() const
G4String CompleteCommandPath(const G4String &commandPath)
G4String GetFirstMatchedString(const G4String &, const G4String &) const
G4UIcommand * FindPath(const char *commandPath) const
std::vector< G4UIcommand * > command
G4UIcommand * guidance
void CreateHTML(G4String="")
void ListCurrent() const
void RemoveCommand(G4UIcommand *aCommand, G4bool workerThreadOnly=false)
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:172
G4bool IsWorkerThreadOnly() const
Definition: G4UIcommand.hh:177
std::size_t GetParameterEntries() const
Definition: G4UIcommand.hh:138
const G4String & GetGuidanceLine(G4int i) const
Definition: G4UIcommand.hh:132
G4UIparameter * GetParameter(G4int i) const
Definition: G4UIcommand.hh:139
G4bool ToBeBroadcasted() const
Definition: G4UIcommand.hh:173
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136
std::size_t GetGuidanceEntries() const
Definition: G4UIcommand.hh:128
std::vector< G4ApplicationState > * GetStateList()
Definition: G4UIcommand.hh:140
void SetWorkerThreadOnly(G4bool val=true)
Definition: G4UIcommand.hh:176
virtual void List()
Definition: G4UIcommand.cc:410
const G4String & GetCommandName() const
Definition: G4UIcommand.hh:137
const G4String & GetRange() const
Definition: G4UIcommand.hh:127
void SetDefaultSortFlag(G4bool val)
Definition: G4UIcommand.hh:208
G4bool IfSort() const
G4int GetVerboseLevel() const
Definition: G4UImanager.hh:200
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
const G4String & GetParameterCandidates() const
G4bool IsOmittable() const
const G4String & GetParameterRange() const
G4bool GetCurrentAsDefault() const
char GetParameterType() const
const G4String & GetParameterName() const
const G4String & GetDefaultValue() const