Geant4-11
Functions
pyG4UnitsTable.cc File Reference
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include "G4UnitsTable.hh"

Go to the source code of this file.

Functions

void export_G4UnitsTable ()
 

Function Documentation

◆ export_G4UnitsTable()

void export_G4UnitsTable ( )

Definition at line 40 of file pyG4UnitsTable.cc.

41{
42 class_<G4UnitsTable>("G4UnitsTable", "Units Table")
43 .def(vector_indexing_suite<G4UnitsTable>())
44 ;
45
46 class_<G4UnitsContainer>("G4UnitsContainer", "Units Container")
47 .def(vector_indexing_suite<G4UnitsContainer>())
48 ;
49
50 class_<G4UnitDefinition, boost::noncopyable>
51 ("G4UnitDefinition", "Unit Definition", no_init)
52 .def(init<const G4String&, const G4String&, const G4String&, G4double>())
53 // ---
54 .def("GetName", &G4UnitDefinition::GetName,
55 return_value_policy<return_by_value>())
56 .def("GetSymbol", &G4UnitDefinition::GetSymbol,
57 return_value_policy<return_by_value>())
58 .def("GetValue", &G4UnitDefinition::GetValue)
59 .def("PrintDefinition", &G4UnitDefinition::PrintDefinition)
60 // ---
61 .def("BuildUnitsTable", &G4UnitDefinition::BuildUnitsTable)
62 .staticmethod("BuildUnitsTable")
63 .def("PrintUnitsTable", &G4UnitDefinition::PrintUnitsTable)
64 .staticmethod("PrintUnitsTable")
65 .def("GetUnitsTable", &G4UnitDefinition::GetUnitsTable,
66 return_value_policy<reference_existing_object>())
67 .staticmethod("GetUnitsTable")
68 // ---
69 .def("GetValueOf", &G4UnitDefinition::GetValueOf)
70 .staticmethod("GetValueOf")
71 .def("GetCategory", &G4UnitDefinition::GetCategory)
72 .staticmethod("GetCategory")
73 ;
74
75 class_<G4UnitsCategory, boost::noncopyable>
76 ("G4UnitsCategory", "Units Category", no_init)
77 .def(init<const G4String&>())
78 // ---
79 .def("GetName", &G4UnitsCategory::GetName,
80 return_value_policy<return_by_value>())
81 .def("GetUnitsList", &G4UnitsCategory::GetUnitsList,
82 return_value_policy<reference_existing_object>())
83 .def("GetNameMxLen", &G4UnitsCategory::GetNameMxLen)
84 .def("GetSymbMxLen", &G4UnitsCategory::GetSymbMxLen)
85 .def("UpdateNameMxLen", &G4UnitsCategory::UpdateNameMxLen)
86 .def("UpdateSymbMxLen", &G4UnitsCategory::UpdateSymbMxLen)
87 .def("PrintCategory", &G4UnitsCategory::PrintCategory)
88 ;
89
90 class_<G4BestUnit>("G4BestUnit", "present best unit", no_init)
91 .def(init<G4double, const G4String&>())
92 .def(init<const G4ThreeVector&, const G4String&>())
93 // ---
94 .def("GetCategory", &G4BestUnit::GetCategory,
95 return_value_policy<return_by_value>())
96 .def("GetIndexOfCategory", &G4BestUnit::GetIndexOfCategory)
97 .def(self_ns::str(self))
98 ;
99
100}
const G4String & GetCategory() const
std::size_t GetIndexOfCategory() const
static void BuildUnitsTable()
G4double GetValue() const
static G4double GetValueOf(const G4String &)
static G4String GetCategory(const G4String &)
static void PrintUnitsTable()
const G4String & GetName() const
static G4UnitsTable & GetUnitsTable()
const G4String & GetSymbol() const
const G4String & GetName() const
void UpdateSymbMxLen(G4int len)
G4UnitsContainer & GetUnitsList()
void UpdateNameMxLen(G4int len)
G4int GetNameMxLen() const
G4int GetSymbMxLen() const

References G4UnitDefinition::BuildUnitsTable(), G4BestUnit::GetCategory(), G4UnitDefinition::GetCategory(), G4BestUnit::GetIndexOfCategory(), G4UnitDefinition::GetName(), G4UnitsCategory::GetName(), G4UnitsCategory::GetNameMxLen(), G4UnitsCategory::GetSymbMxLen(), G4UnitDefinition::GetSymbol(), G4UnitsCategory::GetUnitsList(), G4UnitDefinition::GetUnitsTable(), G4UnitDefinition::GetValue(), G4UnitDefinition::GetValueOf(), G4UnitsCategory::PrintCategory(), G4UnitDefinition::PrintDefinition(), G4UnitDefinition::PrintUnitsTable(), G4UnitsCategory::UpdateNameMxLen(), and G4UnitsCategory::UpdateSymbMxLen().

Referenced by BOOST_PYTHON_MODULE().