33 #ifndef G4APPLYCOMMANDST_HH
34 #define G4APPLYCOMMANDST_HH
37 #include "G4String.hh"
81 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
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;
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>
G4UIcmdWithADoubleAndUnit * Command()
void SetParameter(G4UIparameter *const newParameter)
G4ModelCmdApplyColour(M *model, const G4String &placement, const G4String &cmdName)
G4UIcommand * ComponentCommand()
virtual ~G4ModelCmdApplyNull()
std::ostringstream G4ExceptionDescription
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
virtual ~G4ModelCmdApplyColour()
G4ModelCmdApplyDoubleAndUnit(M *model, const G4String &placement, const G4String &cmdName)
G4UIcmdWithAString * fpCmd
static G4VVisManager * GetConcreteInstance()
G4UIcommand * StringCommand()
virtual ~G4ModelCmdApplyDouble()
virtual ~G4ModelCmdApplyString()
G4ModelCmdApplyString(M *model, const G4String &placement, const G4String &cmdName)
static G4bool GetColour(const G4String &key, G4Colour &result)
virtual void Apply(const G4double &)=0
G4ModelCmdApplyDouble(M *model, const G4String &placement, const G4String &cmdName)
G4UIcmdWithADouble * fpCmd
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4ModelCmdApplyStringColour()
G4UIcmdWithADouble * Command()
G4UIcmdWithADoubleAndUnit * fpCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcommand * fpStringCmd
virtual void Apply(const G4String &, const G4Colour &)=0
virtual ~G4ModelCmdApplyDoubleAndUnit()
G4UIcmdWithAnInteger * Command()
G4UIcmdWithAString * Command()
void SetGuidance(const char *aGuidance)
G4UIcommand * ComponentCommand()
G4UIcommand * fpComponentCmd
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4int &)=0
G4UIcmdWithAnInteger * fpCmd
virtual void NotifyHandlers()
G4UIcmdWithABool * Command()
G4UIcommand * fpComponentCmd
virtual void Apply(const G4Colour &)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4ModelCmdApplyBool(M *model, const G4String &placement, const G4String &cmdName)
virtual ~G4ModelCmdApplyInteger()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4ModelCmdApplyBool()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcommand * StringCommand()
G4ModelCmdApplyInteger(M *model, const G4String &placement, const G4String &cmdName)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcommand * fpStringCmd
virtual void Apply(const G4String &)=0
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4double &)=0
G4ModelCmdApplyNull(M *model, const G4String &placement, const G4String &cmdName)
static const G4double alpha
G4ModelCmdApplyStringColour(M *model, const G4String &placement, const G4String &cmdName)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4bool &)=0
void SetNewValue(G4UIcommand *command, G4String newValue)