LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 48 of file test02.cc.

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

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 }
virtual int VMethod(const XBase *abase) const =0
void AMethod()
Definition: XBase.cc:59
int GetIVal() const
Definition: XBase.hh:65
void AMethod()
Definition: BClass.cc:57
double GetDVal() const
Definition: XBase.hh:68
void AMethod()
Definition: AClass.cc:66
void SetIVal(int aval)
Definition: XBase.hh:64
void SetDVal(double aval)
Definition: XBase.hh:67