Geant4-11
Functions
pyG4String.cc File Reference
#include <boost/python.hpp>
#include "G4String.hh"

Go to the source code of this file.

Functions

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

Function Documentation

◆ export_G4String()

void export_G4String ( )

Definition at line 47 of file pyG4String.cc.

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}

Referenced by BOOST_PYTHON_MODULE().

◆ operator<<()

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}