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

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &ostr, const G4String &astr)
 
void export_G4String ()
 

Function Documentation

void export_G4String ( )

Definition at line 47 of file pyG4String.cc.

Referenced by BOOST_PYTHON_MODULE().

48 {
49  class_<G4String>("G4String", "string class")
50  .def(init<const G4String&>())
51  .def(init<const char*>())
52  .def(self_ns::str(self))
53  .def(self + self)
54  .def(self += self)
55  .def(self += other<const char*>())
56  .def(self == self)
57  .def(self == other<const char*>())
58  .def(self != self)
59  .def(self != other<const char*>())
60  ;
61 
62  implicitly_convertible<G4String, const char*>();
63  implicitly_convertible<const char* ,G4String>();
64 
65  implicitly_convertible<G4String, std::string>();
66  implicitly_convertible<std::string ,G4String>();
67 }
std::ostream& operator<< ( std::ostream &  ostr,
const G4String astr 
)

Definition at line 39 of file pyG4String.cc.

40 {
41  return ostr << astr.c_str();
42 }