39 G4int n_treeEntry = alias.size();
40 for( i=0; i < n_treeEntry; i++ )
47 return (
this == &right );
52 return (
this != &right );
55 void G4UIaliasList::AddNewAlias(
const char* aliasName,
const char* aliasValue)
59 G4cerr <<
"Alias <" << aliasName <<
"> already exist. Command ignored."
64 alias.push_back(newAlias);
66 value.push_back(newValue);
71 G4int i = FindAliasID(aliasName);
74 G4cerr <<
"Alias <" << aliasName <<
"> does not exist. Command ignored."
78 alias.erase(alias.begin()+i);
84 G4int i = FindAliasID(aliasName);
87 AddNewAlias(aliasName,aliasValue);
90 *(
value[i]) = aliasValue;
95 G4int i = FindAliasID(aliasName);
101 G4int G4UIaliasList::FindAliasID(
const char* aliasName)
103 G4int i_entry = alias.size();
104 for(
G4int i=0;i<i_entry;i++)
105 {
if(*(alias[i])==aliasName)
return i; }
111 G4int i_entry = alias.size();
112 for(
G4int i1=0;i1<i_entry-1;i1++)
113 for(
G4int i2=i1+1;i2<i_entry;i2++)
115 if(*(alias[i1])>*(alias[i2]))
118 alias[i1] = alias[i2];
126 for(
G4int i=0;i<i_entry;i++)
G4GLOB_DLL std::ostream G4cout
void ChangeAlias(const char *aliasName, const char *aliasValue)
G4String * FindAlias(const char *aliasName)
const XML_Char int const XML_Char * value
G4GLOB_DLL std::ostream G4cerr
void RemoveAlias(const char *aliasName)