Adding Name's operators binding
This commit is contained in:
parent
0a06335e15
commit
685dde710f
|
@ -10,18 +10,18 @@ SET ( cpps Techno.cpp
|
|||
|
||||
SET ( pycpps PyDtr.cpp ${cpps})
|
||||
|
||||
ADD_LIBRARY(dtr ${cpps})
|
||||
ADD_LIBRARY(dtr ${cpps})
|
||||
TARGET_LINK_LIBRARIES(dtr ${LIBXML2_LIBRARIES})
|
||||
INSTALL(TARGETS dtr DESTINATION lib${LIB_SUFFIX})
|
||||
|
||||
IF (Boost_FOUND)
|
||||
ADD_LIBRARY(pyDTR MODULE ${pycpps})
|
||||
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
|
||||
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
|
||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||
PREFIX ""
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||
INSTALL(TARGETS pyDTR DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||
INSTALL(TARGETS pyDTR DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
ENDIF(Boost_FOUND)
|
||||
|
||||
INSTALL(FILES ${hpps} DESTINATION include/vlsisapd/dtr)
|
||||
|
|
|
@ -24,6 +24,11 @@ BOOST_PYTHON_MODULE(pyDTR) {
|
|||
// class DTR::Name
|
||||
class_<Name>("Name", init<std::string>())
|
||||
.def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a refenrce on string
|
||||
.def(self == self)
|
||||
.def(self == std::string())
|
||||
.def(self != self)
|
||||
.def(self != std::string())
|
||||
.def(self < self)
|
||||
;
|
||||
|
||||
// class DTR::Rule
|
||||
|
|
Loading…
Reference in New Issue