Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test12.cc File Reference
#include <boost/python.hpp>
#include "vector_indexing_suite.hpp"
#include <vector>
#include <iostream>
Include dependency graph for test12.cc:

Go to the source code of this file.

Classes

class  AClass
 

Typedefs

typedef std::vector< AClass * > AVector
 

Functions

void PrintVector (const AVector &vec)
 
 BOOST_PYTHON_MODULE (test12)
 

Typedef Documentation

typedef std::vector<AClass*> AVector

Definition at line 69 of file test12.cc.

Function Documentation

BOOST_PYTHON_MODULE ( test12  )

Definition at line 84 of file test12.cc.

85 {
86  class_<AClass, AClass*>("AClass", "a class")
87  .add_property("ival", &AClass::GetIVal, &AClass::SetIVal)
88  .def("Print", &AClass::Print)
89  ;
90 
91  class_<AVector> ("AVector", "AClass vector")
93  ;
94 
95  def("PrintVector", PrintVector);
96 }
void SetIVal(int i)
Definition: AClass.hh:66
void PrintVector(const AVector &vec)
Definition: test12.cc:72
int GetIVal() const
Definition: AClass.hh:67
void Print() const
Definition: test12.cc:62

Here is the call graph for this function:

void PrintVector ( const AVector vec)

Definition at line 72 of file test12.cc.

72  {
73  std::cout << "*** size of AVector= " << vec.size() << std::endl;
74  for (int i=0; i< vec.size(); i++) {
75  vec[i]-> Print();
76  }
77 }
void Print(const std::vector< T > &data)
Definition: DicomRun.hh:109

Here is the call graph for this function:

Here is the caller graph for this function: