Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
global
src
TG4UICmdWithAComplexString.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4UICmdWithAComplexString.h
"
16
17
#include <sstream>
18
19
//_____________________________________________________________________________
20
TG4UICmdWithAComplexString::TG4UICmdWithAComplexString
(
21
const
G4String& theCommandPath,
G4UImessenger
* theMessenger)
22
:
G4UIcommand
(theCommandPath, theMessenger)
23
{
27
28
G4UIparameter* first =
new
G4UIparameter(
's'
);
29
SetParameter(first);
30
G4UIparameter* second =
new
G4UIparameter(
's'
);
31
SetParameter(second);
32
G4UIparameter* third =
new
G4UIparameter(
's'
);
33
SetParameter(third);
34
}
35
36
//_____________________________________________________________________________
37
TG4UICmdWithAComplexString::~TG4UICmdWithAComplexString
()
38
{
40
}
41
42
//
43
// public methods
44
//
45
46
//_____________________________________________________________________________
47
void
TG4UICmdWithAComplexString::SetParameterName
(
48
const
G4String& name, G4bool omittable)
49
{
57
58
G4UIparameter* first = GetParameter(0);
59
first->SetParameterName(name);
60
first->SetOmittable(omittable);
61
first->SetCurrentAsDefault(
false
);
62
63
G4UIparameter* second = GetParameter(1);
64
G4String secondName = name +
"_cont1"
;
65
second->SetParameterName(secondName);
66
second->SetOmittable(
true
);
67
second->SetCurrentAsDefault(
false
);
68
69
G4UIparameter* third = GetParameter(2);
70
G4String thirdName = name +
"_cont2"
;
71
third->SetParameterName(thirdName);
72
third->SetOmittable(
true
);
73
third->SetCurrentAsDefault(
false
);
74
}
75
76
//_____________________________________________________________________________
77
void
TG4UICmdWithAComplexString::SetDefaultValue
(
const
G4String& defaultValue)
78
{
83
84
G4UIparameter* first = GetParameter(0);
85
first->SetDefaultValue(defaultValue);
86
87
G4UIparameter* second = GetParameter(1);
88
second->SetDefaultValue(
" "
);
89
90
G4UIparameter* third = GetParameter(2);
91
third->SetDefaultValue(
" "
);
92
}
93
94
//_____________________________________________________________________________
95
G4String
TG4UICmdWithAComplexString::GetNewStringValue
(
96
const
G4String& paramString)
97
{
99
100
return
paramString;
101
}
TG4UICmdWithAComplexString.h
Definition of the TG4UICmdWithAComplexString class.
G4UIcommand
G4UImessenger
TG4UICmdWithAComplexString::~TG4UICmdWithAComplexString
virtual ~TG4UICmdWithAComplexString()
Definition
TG4UICmdWithAComplexString.cxx:37
TG4UICmdWithAComplexString::GetNewStringValue
G4String GetNewStringValue(const G4String ¶mString)
Definition
TG4UICmdWithAComplexString.cxx:95
TG4UICmdWithAComplexString::TG4UICmdWithAComplexString
TG4UICmdWithAComplexString(const G4String &theCommandPath, G4UImessenger *theMessenger)
Definition
TG4UICmdWithAComplexString.cxx:20
TG4UICmdWithAComplexString::SetDefaultValue
void SetDefaultValue(const G4String &defVal)
Definition
TG4UICmdWithAComplexString.cxx:77
TG4UICmdWithAComplexString::SetParameterName
void SetParameterName(const G4String &name, G4bool omittable)
Definition
TG4UICmdWithAComplexString.cxx:47
Generated on
for Geant4 VMC by
1.17.0