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>
G4ModelCmdApplyDouble(M *model, const G4String &placement, const G4String &cmdName)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetGuidance(const char *aGuidance)
G4UIcommand * fpStringCmd
G4UIcmdWithAnInteger * Command()
virtual ~G4ModelCmdApplyStringColour()
std::ostringstream G4ExceptionDescription
G4ModelCmdApplyInteger(M *model, const G4String &placement, const G4String &cmdName)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcommand * fpComponentCmd
G4UIcommand * ComponentCommand()
virtual ~G4ModelCmdApplyDoubleAndUnit()
G4UIcmdWithADoubleAndUnit * Command()
virtual void Apply(const G4double &)=0
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4ModelCmdApplyDouble()
virtual ~G4ModelCmdApplyColour()
virtual void Apply(const G4bool &)=0
G4UIcommand * fpComponentCmd
G4ModelCmdApplyString(M *model, const G4String &placement, const G4String &cmdName)
static G4VVisManager * GetConcreteInstance()
void SetParameter(G4UIparameter *const newParameter)
G4UIcmdWithABool * Command()
G4UIcmdWithADouble * Command()
G4UIcmdWithAString * fpCmd
G4UIcmdWithADouble * fpCmd
G4UIcommand * StringCommand()
static const G4double alpha
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void NotifyHandlers()
G4UIcmdWithAnInteger * fpCmd
virtual ~G4ModelCmdApplyBool()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcommand * fpStringCmd
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void Apply(const G4String &, const G4Colour &)=0
G4UIcommand * StringCommand()
virtual ~G4ModelCmdApplyInteger()
G4UIcommand * ComponentCommand()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4Colour &)=0
virtual void Apply(const G4String &)=0
void SetNewValue(G4UIcommand *command, G4String newValue)
G4ModelCmdApplyDoubleAndUnit(M *model, const G4String &placement, const G4String &cmdName)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * Command()
virtual void Apply(const G4int &)=0
G4ModelCmdApplyNull(M *model, const G4String &placement, const G4String &cmdName)
virtual ~G4ModelCmdApplyString()
G4ModelCmdApplyStringColour(M *model, const G4String &placement, const G4String &cmdName)
virtual ~G4ModelCmdApplyNull()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithADoubleAndUnit * fpCmd
const XML_Char XML_Content * model
G4ModelCmdApplyColour(M *model, const G4String &placement, const G4String &cmdName)
virtual void Apply(const G4double &)=0
G4ModelCmdApplyBool(M *model, const G4String &placement, const G4String &cmdName)
static G4bool GetColour(const G4String &key, G4Colour &result)
void SetNewValue(G4UIcommand *command, G4String newValue)