LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
test02.cc File Reference
#include <boost/python.hpp>
#include "XBase.hh"
#include "AClass.hh"
#include "BClass.hh"

Go to the source code of this file.

Functions

 BOOST_PYTHON_MODULE (test02)
 

Function Documentation

BOOST_PYTHON_MODULE ( test02  )

Definition at line 47 of file test02.cc.

References BClass::AMethod(), XBase::AMethod(), AClass::AMethod(), XBase::GetDVal(), XBase::GetIVal(), XBase::SetDVal(), XBase::SetIVal(), and XBase::VMethod().

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