MCPcopy Create free account
hub / github.com/Geant4/geant4 / FindCommand

Method FindCommand

source/interfaces/core/src/G4VBasicShell.cc:106–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106G4UIcommand* G4VBasicShell::FindCommand(const char* commandName) const
107{
108 const G4String& commandLine = G4StrUtil::strip_copy(commandName);
109
110 G4String commandString;
111 std::size_t i = commandLine.find(' ');
112 if (i != std::string::npos) {
113 commandString = commandLine.substr(0, i);
114 }
115 else {
116 commandString = commandLine;
117 }
118
119 const G4String& targetCom = ModifyPath(commandString);
120 return G4UImanager::GetUIpointer()->GetTree()->FindPath(targetCom);
121}
122
123G4String G4VBasicShell::ModifyPath(const G4String& tempPath) const
124{

Callers 1

ActWithAStringMethod · 0.45

Calls 4

substrMethod · 0.80
FindPathMethod · 0.80
findMethod · 0.45
GetTreeMethod · 0.45

Tested by

no test coverage detected