33 #ifndef G4APPLYCOMMANDST_HH
34 #define G4APPLYCOMMANDST_HH
37 #include "G4String.hh"
81 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
85 fpStringCmd->
SetGuidance(
"Set variable colour through a string");
96 fpComponentCmd =
new G4UIcommand(componentDir,
this);
97 fpComponentCmd->
SetGuidance(
"Set variable colour through red, green, blue and alpha components");
114 template <
typename M>
118 delete fpComponentCmd;
121 template <
typename M>
127 if (cmd == fpStringCmd) {
129 std::istringstream is (newValue);
130 is >> parameter >> colour;
135 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
137 (
"G4ModelCmdApplyStringColour<M>::SetNewValue",
143 if (cmd == fpComponentCmd) {
145 std::istringstream is (newValue);
152 Apply(parameter, myColour);
159 template <
typename M>
185 template <
typename M>
190 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
194 fpStringCmd->
SetGuidance(
"Set colour through a string");
202 fpComponentCmd =
new G4UIcommand(componentDir,
this);
203 fpComponentCmd->
SetGuidance(
"Set colour through red, green, blue and alpha components");
204 fpComponentCmd->
SetGuidance(
"Four inputs are expected.");
219 template <
typename M>
223 delete fpComponentCmd;
226 template <
typename M>
231 if (cmd == fpStringCmd) {
233 std::istringstream is (newValue);
239 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
241 (
"G4ModelCmdApplyColour<M>::SetNewValue",
247 if (cmd == fpComponentCmd) {
249 std::istringstream is (newValue);
263 template <
typename M>
286 template <
typename M>
290 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
296 template <
typename M>
302 template <
typename M>
305 Apply(fpCmd->GetNewBoolValue(newValue));
307 if (visManager) visManager->NotifyHandlers();
312 template <
typename M>
326 virtual void Apply() = 0;
336 template <
typename M>
340 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
344 template <
typename M>
350 template <
typename M>
360 template <
typename M>
384 template <
typename M>
388 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
394 template <
typename M>
400 template <
typename M>
403 Apply(fpCmd->GetNewDoubleValue(newValue));
405 if (visManager) visManager->NotifyHandlers();
410 template <
typename M>
434 template <
typename M>
438 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
444 template <
typename M>
450 template <
typename M>
453 Apply(fpCmd->GetNewDoubleValue(newValue));
455 if (visManager) visManager->NotifyHandlers();
460 template <
typename M>
483 template <
typename M>
487 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
493 template <
typename M>
499 template <
typename M>
502 Apply(fpCmd->GetNewIntValue(newValue));
504 if (visManager) visManager->NotifyHandlers();
509 template <
typename M>
533 template <
typename M>
537 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
542 template <
typename M>
548 template <
typename M>