Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test02.cc File Reference
#include <boost/python.hpp>
#include "XBase.hh"
#include "AClass.hh"
#include "BClass.hh"
Include dependency graph for test02.cc:

Go to the source code of this file.

Functions

 BOOST_PYTHON_MODULE (test02)
 

Function Documentation

BOOST_PYTHON_MODULE ( test02  )

Definition at line 48 of file test02.cc.

48  {
49  class_<XBase, boost::noncopyable>("XBase", "Base Class", no_init)
50  .add_property("ival", &XBase::GetIVal, &XBase::SetIVal)
51  .add_property("dval", &XBase::GetDVal, &XBase::SetDVal)
52  .def("AMethod", &XBase::AMethod)
53  .def("VMethod", &XBase::VMethod)
54  ;
55 
56  class_<AClass, bases<XBase> >( "AClass", "Derived Class A")
57  .def(init<>())
58  .def("AMethod", &AClass::AMethod)
59  ;
60 
61  class_<BClass, bases<XBase> >( "BClass", "Derived Class B")
62  .def(init<>())
63  .def("AMethod", &BClass::AMethod)
64  ;
65 }
void AMethod()
Definition: XBase.cc:59
void AMethod()
Definition: BClass.cc:57
void SetDVal(double aval)
Definition: XBase.hh:67
int GetIVal() const
Definition: XBase.hh:65
void SetIVal(int aval)
Definition: XBase.hh:64
virtual int VMethod(const XBase *abase) const =0
void AMethod()
Definition: AClass.cc:66
double GetDVal() const
Definition: XBase.hh:68

Here is the call graph for this function: