42 virtual const char*
what()
const throw() {
43 return "G4InvalidUICommand: command does not exists or is of invalid type";
51 size_t pos = dir.find_last_of(
'/', dir.size()-2);
52 while(pos != 0 && pos != std::string::npos) {
55 guidance += dir.substr(1,pos-1);
57 pos = dir.find_last_of(
'/', pos-1);
65 for (std::map<G4String, Property>::iterator i = properties.begin(); i != properties.end(); i++)
delete i->second.command;
66 for (std::map<G4String, Method>::iterator i = methods.begin(); i != methods.end(); i++)
delete i->second.command;
77 var.
TypeInfo() ==
typeid(
unsigned int) || var.
TypeInfo() ==
typeid(
unsigned long)) ptype =
'i';
78 else if(var.
TypeInfo() ==
typeid(float) || var.
TypeInfo() ==
typeid(double)) ptype =
'd';
79 else if(var.
TypeInfo() ==
typeid(bool)) ptype =
'b';
92 for (
size_t i = 0; i < fun.
NArg(); i++) {
95 return methods[
name] =
Method(fun,
object, cmd);
99 if ( properties.find(command->
GetCommandName()) != properties.end()) {
117 if ( properties.find(command->
GetCommandName()) != properties.end()) {
121 else if (methods.find(command->
GetCommandName()) != methods.end()) {
147 std::vector<G4String> guidance;
153 if (*
type ==
typeid(
float) || *
type ==
typeid(
double) ) {
166 G4cerr <<
"Only parameters of type <double> or <float> can be associated with units" <<
G4endl;