32#ifndef G4APPLYCOMMANDST_HH
33#define G4APPLYCOMMANDST_HH
80 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
84 fpStringCmd->
SetGuidance(
"Set variable colour through a string");
95 fpComponentCmd =
new G4UIcommand(componentDir,
this);
96 fpComponentCmd->
SetGuidance(
"Set variable colour through red, green, blue and alpha components");
117 delete fpComponentCmd;
126 if (cmd == fpStringCmd) {
128 std::istringstream is (newValue);
129 is >> parameter >> colour;
134 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
136 (
"G4ModelCmdApplyStringColour<M>::SetNewValue",
142 if (cmd == fpComponentCmd) {
143 G4double red(0), green(0), blue(0), alpha(0);
144 std::istringstream is (newValue);
145 is >> parameter >> red >> green >> blue >> alpha;
147 G4Colour colour(red, green, blue, alpha);
151 Apply(parameter, myColour);
189 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
193 fpStringCmd->
SetGuidance(
"Set colour through a string");
201 fpComponentCmd =
new G4UIcommand(componentDir,
this);
202 fpComponentCmd->
SetGuidance(
"Set colour through red, green, blue and alpha components");
203 fpComponentCmd->
SetGuidance(
"Four inputs are expected.");
222 delete fpComponentCmd;
230 if (cmd == fpStringCmd) {
232 std::istringstream is (newValue);
238 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
240 (
"G4ModelCmdApplyColour<M>::SetNewValue",
246 if (cmd == fpComponentCmd) {
247 G4double red(0), green(0), blue(0), alpha(0);
248 std::istringstream is (newValue);
249 is >> red >> green >> blue >> alpha;
251 G4Colour colour(red, green, blue, alpha);
289 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
304 Apply(fpCmd->GetNewBoolValue(newValue));
339 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
387 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
402 Apply(fpCmd->GetNewDoubleValue(newValue));
437 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
452 Apply(fpCmd->GetNewDoubleValue(newValue));
486 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
501 Apply(fpCmd->GetNewIntValue(newValue));
536 G4String dir = placement+
"/"+model->Name()+
"/"+cmdName;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static G4bool GetColour(const G4String &key, G4Colour &result)
virtual ~G4ModelCmdApplyBool()
G4UIcmdWithABool * Command()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4ModelCmdApplyBool(M *model, const G4String &placement, const G4String &cmdName)
virtual void Apply(const G4bool &)=0
G4UIcommand * StringCommand()
virtual ~G4ModelCmdApplyColour()
G4ModelCmdApplyColour(M *model, const G4String &placement, const G4String &cmdName)
virtual void Apply(const G4Colour &)=0
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcommand * ComponentCommand()
G4UIcmdWithADoubleAndUnit * Command()
virtual void Apply(const G4double &)=0
virtual ~G4ModelCmdApplyDoubleAndUnit()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4ModelCmdApplyDoubleAndUnit(M *model, const G4String &placement, const G4String &cmdName)
virtual void Apply(const G4double &)=0
G4ModelCmdApplyDouble(M *model, const G4String &placement, const G4String &cmdName)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4ModelCmdApplyDouble()
G4UIcmdWithADouble * Command()
virtual ~G4ModelCmdApplyInteger()
G4ModelCmdApplyInteger(M *model, const G4String &placement, const G4String &cmdName)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4int &)=0
G4UIcmdWithAnInteger * Command()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4ModelCmdApplyNull()
G4ModelCmdApplyNull(M *model, const G4String &placement, const G4String &cmdName)
G4UIcommand * StringCommand()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual void Apply(const G4String &, const G4Colour &)=0
virtual ~G4ModelCmdApplyStringColour()
G4ModelCmdApplyStringColour(M *model, const G4String &placement, const G4String &cmdName)
G4UIcommand * ComponentCommand()
G4ModelCmdApplyString(M *model, const G4String &placement, const G4String &cmdName)
virtual void Apply(const G4String &)=0
virtual ~G4ModelCmdApplyString()
G4UIcmdWithAString * Command()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
virtual void NotifyHandlers()
static G4VVisManager * GetConcreteInstance()