Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
pymodG4intercoms.cc File Reference
#include <boost/python.hpp>

Go to the source code of this file.

Functions

void export_G4UImanager ()
 
void export_G4UIcommandTree ()
 
void export_G4UIcommand ()
 
void export_G4UIparameter ()
 
 BOOST_PYTHON_MODULE (G4intercoms)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4intercoms  )

Definition at line 45 of file pymodG4intercoms.cc.

References export_G4UIcommand(), export_G4UIcommandTree(), export_G4UImanager(), and export_G4UIparameter().

46 {
51 }
void export_G4UIcommandTree()
void export_G4UIparameter()
void export_G4UIcommand()
void export_G4UImanager()
void export_G4UIcommand ( )

Definition at line 63 of file pyG4UIcommand.cc.

References pyG4UIcommand::f_GetStateList(), G4UIcommand::GetCommandName(), G4UIcommand::GetCommandPath(), G4UIcommand::GetCurrentValue(), G4UIcommand::GetGuidanceEntries(), G4UIcommand::GetGuidanceLine(), G4UIcommand::GetParameter(), G4UIcommand::GetParameterEntries(), G4UIcommand::GetRange(), G4UIcommand::GetTitle(), G4UIcommand::IsAvailable(), and G4UIcommand::List().

Referenced by BOOST_PYTHON_MODULE().

64 {
65  class_<G4UIcommand, G4UIcommand*>
66  ("G4UIcommand", "UI command")
67  .def(init<const char*, G4UImessenger*>())
68  // ---
69  .def("GetCurrentValue", &G4UIcommand::GetCurrentValue)
70  .def("IsAvailable", &G4UIcommand::IsAvailable)
71  .def("List", &G4UIcommand::List)
72  .def("GetRange", &G4UIcommand::GetRange,
73  return_value_policy<return_by_value>())
74  .def("GetGuidanceEntries", &G4UIcommand::GetGuidanceEntries)
75  .def("GetGuidanceLine", &G4UIcommand::GetGuidanceLine,
76  return_value_policy<return_by_value>())
77  .def("GetCommandPath", &G4UIcommand::GetCommandPath,
78  return_value_policy<return_by_value>())
79  .def("GetCommandName", &G4UIcommand::GetCommandName,
80  return_value_policy<return_by_value>())
81  .def("GetParameterEntries", &G4UIcommand::GetParameterEntries)
82  .def("GetParameter", &G4UIcommand::GetParameter,
83  return_value_policy<reference_existing_object>())
84  .def("GetStateList", f_GetStateList)
85  .def("GetTitle", &G4UIcommand::GetTitle)
86  ;
87 }
G4bool IsAvailable()
Definition: G4UIcommand.cc:275
const G4String & GetRange() const
Definition: G4UIcommand.hh:133
list f_GetStateList(G4UIcommand *acommand)
const G4String GetTitle() const
Definition: G4UIcommand.hh:170
const G4String & GetGuidanceLine(G4int i) const
Definition: G4UIcommand.hh:137
G4UIparameter * GetParameter(G4int i) const
Definition: G4UIcommand.hh:145
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:139
const G4String & GetCommandName() const
Definition: G4UIcommand.hh:141
virtual void List()
Definition: G4UIcommand.cc:334
G4int GetGuidanceEntries() const
Definition: G4UIcommand.hh:135
G4int GetParameterEntries() const
Definition: G4UIcommand.hh:143
G4String GetCurrentValue()
Definition: G4UIcommand.cc:220
void export_G4UIcommandTree ( )

Definition at line 55 of file pyG4UIcommandTree.cc.

References G4UIcommandTree::CreateHTML(), pyG4UIcommandTree::f1_GetTree, pyG4UIcommandTree::f2_GetTree, G4UIcommandTree::FindPath(), G4UIcommandTree::GetCommand(), G4UIcommandTree::GetCommandEntry(), G4UIcommandTree::GetGuidance(), G4UIcommandTree::GetPathName(), G4UIcommandTree::GetTitle(), G4UIcommandTree::GetTreeEntry(), G4UIcommandTree::List(), G4UIcommandTree::ListCurrent(), and G4UIcommandTree::ListCurrentWithNum().

Referenced by BOOST_PYTHON_MODULE().

56 {
57  class_<G4UIcommandTree, G4UIcommandTree*>
58  ("G4UIcommandTree", "UI command tree")
59  // constructors
60  .def(init<const char*>())
61  // ---
62  .def("FindPath", &G4UIcommandTree::FindPath,
63  return_value_policy<reference_existing_object>())
64  .def("List", &G4UIcommandTree::List)
65  .def("ListCurrent", &G4UIcommandTree::ListCurrent)
66  .def("ListCurrentWithNum", &G4UIcommandTree::ListCurrentWithNum)
67  .def("CreateHTML", &G4UIcommandTree::CreateHTML)
68  .def("GetGuidance", &G4UIcommandTree::GetGuidance,
69  return_value_policy<reference_existing_object>())
70  .def("GetPathName", &G4UIcommandTree::GetPathName)
71  // ---
72  .def("GetTreeEntry", &G4UIcommandTree::GetTreeEntry)
73  .def("GetCommandEntry", &G4UIcommandTree::GetCommandEntry)
74  .def("GetTree", f1_GetTree,
75  return_value_policy<reference_existing_object>())
76  .def("GetTree", f2_GetTree,
77  return_value_policy<reference_existing_object>())
78  .def("GetCommand", &G4UIcommandTree::GetCommand,
79  return_value_policy<reference_existing_object>())
80  // ---
81  .def("GetTitle", &G4UIcommandTree::GetTitle)
82  ;
83 }
G4UIcommand * FindPath(const char *commandPath) const
G4int GetCommandEntry() const
G4UIcommand * GetCommand(G4int i)
G4int GetTreeEntry() const
G4UIcommandTree *(G4UIcommandTree::* f2_GetTree)(const char *)
void ListCurrent() const
void ListCurrentWithNum() const
const G4String GetPathName() const
const G4String GetTitle() const
const G4UIcommand * GetGuidance() const
G4UIcommandTree *(G4UIcommandTree::* f1_GetTree)(G4int)
void List() const
void export_G4UImanager ( )

Definition at line 119 of file pyG4UImanager.cc.

References pyG4UImanager::ApplyUICommand_1(), pyG4UImanager::ApplyUICommand_2(), G4UImanager::CreateHTML(), G4UImanager::ExecuteMacroFile(), pyG4UImanager::f1_ApplyCommand, pyG4UImanager::f2_ApplyCommand, G4UImanager::GetCurrentValues(), G4UImanager::GetMacroSearchPath(), G4UImanager::GetPauseAtBeginOfEvent(), G4UImanager::GetPauseAtEndOfEvent(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), G4UImanager::GetVerboseLevel(), G4UImanager::SetMacroSearchPath(), G4UImanager::SetPauseAtBeginOfEvent(), G4UImanager::SetPauseAtEndOfEvent(), and G4UImanager::SetVerboseLevel().

Referenced by BOOST_PYTHON_MODULE().

120 {
121  class_<G4UImanager, boost::noncopyable>
122  ("G4UImanager", "UI manager class", no_init)
123  .def("GetUIpointer", &G4UImanager::GetUIpointer,
124  return_value_policy<reference_existing_object>())
125  .staticmethod("GetUIpointer")
126  // ---
127  .def("GetCurrentValues", &G4UImanager::GetCurrentValues)
128  .def("ExecuteMacroFile", &G4UImanager::ExecuteMacroFile)
129  .def("ApplyCommand", f1_ApplyCommand)
130  .def("ApplyCommand", f2_ApplyCommand)
131  .def("CreateHTML", &G4UImanager::CreateHTML, f_CreateHTML())
132  .def("SetMacroSearchPath", &G4UImanager::SetMacroSearchPath)
133  .def("GetMacroSearchPath", &G4UImanager::GetMacroSearchPath,
134  return_value_policy<return_by_value>())
135  // ---
136  .def("SetPauseAtBeginOfEvent", &G4UImanager::SetPauseAtBeginOfEvent)
137  .def("GetPauseAtBeginOfEvent", &G4UImanager::GetPauseAtBeginOfEvent)
138  .def("SetPauseAtEndOfEvent", &G4UImanager::SetPauseAtEndOfEvent)
139  .def("GetPauseAtEndOfEvent", &G4UImanager::GetPauseAtEndOfEvent)
140  .def("SetVerboseLevel", &G4UImanager::SetVerboseLevel)
141  .def("GetVerboseLevel", &G4UImanager::GetVerboseLevel)
142  // ---
143  .def("GetTree", &G4UImanager::GetTree,
144  return_value_policy<reference_existing_object>())
145  ;
146 
147  // ---
148  def("ApplyUICommand", ApplyUICommand_1);
149  def("ApplyUICommand", ApplyUICommand_2);
150 
151 }
void SetMacroSearchPath(const G4String &path)
Definition: G4UImanager.hh:243
void ExecuteMacroFile(const char *fileName)
Definition: G4UImanager.cc:278
G4int(G4UImanager::* f2_ApplyCommand)(const G4String &)
G4int GetVerboseLevel() const
Definition: G4UImanager.hh:227
void SetVerboseLevel(G4int val)
Definition: G4UImanager.hh:225
G4int ApplyUICommand_1(const G4String &cmdstr)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
G4bool GetPauseAtBeginOfEvent() const
Definition: G4UImanager.hh:194
G4bool GetPauseAtEndOfEvent() const
Definition: G4UImanager.hh:198
G4String GetCurrentValues(const char *aCommand)
Definition: G4UImanager.cc:156
G4int ApplyUICommand_2(const std::string &cmdstr)
G4UIcommandTree * GetTree() const
Definition: G4UImanager.hh:206
void SetPauseAtEndOfEvent(G4bool vl)
Definition: G4UImanager.hh:196
const G4String & GetMacroSearchPath() const
Definition: G4UImanager.hh:245
void SetPauseAtBeginOfEvent(G4bool vl)
Definition: G4UImanager.hh:192
void CreateHTML(const char *dir="/")
Definition: G4UImanager.cc:628
G4int(G4UImanager::* f1_ApplyCommand)(const char *)
void export_G4UIparameter ( )

Definition at line 40 of file pyG4UIparameter.cc.

References G4UIparameter::GetCurrentAsDefault(), G4UIparameter::GetDefaultValue(), G4UIparameter::GetParameterCandidates(), G4UIparameter::GetParameterGuidance(), G4UIparameter::GetParameterName(), G4UIparameter::GetParameterRange(), G4UIparameter::GetParameterType(), G4UIparameter::IsOmittable(), and G4UIparameter::List().

Referenced by BOOST_PYTHON_MODULE().

41 {
42  class_<G4UIparameter, G4UIparameter*>
43  ("G4UIparameter", "UI parameter")
44  // constructors
45  .def(init<char>())
46  .def(init<const char*, char, G4bool>())
47  // ---
48  .def("List", &G4UIparameter::List)
49  .def("GetDefaultValue", &G4UIparameter::GetDefaultValue)
50  .def("GetParameterType", &G4UIparameter::GetParameterType)
51  .def("GetParameterRange", &G4UIparameter::GetParameterRange)
52  .def("GetParameterName", &G4UIparameter::GetParameterName)
53  .def("GetParameterCandidates", &G4UIparameter::GetParameterCandidates)
54  .def("IsOmittable", &G4UIparameter::IsOmittable)
55  .def("GetCurrentAsDefault", &G4UIparameter::GetCurrentAsDefault)
56  .def("GetParameterGuidance", &G4UIparameter::GetParameterGuidance)
57  ;
58 }
G4String GetParameterCandidates() const
G4String GetParameterName() const
G4bool IsOmittable() const
G4String GetDefaultValue() const
char GetParameterType() const
const G4String GetParameterGuidance() const
G4String GetParameterRange() const
G4bool GetCurrentAsDefault() const