Menu

[ccc612]: / binding / python / rdf_id.cpp  Maximize  Restore  History

Download this file

44 lines (39 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/** @file "/owlcpp/binding/python/rdf_id.cpp"
part of owlcpp project.
@n @n Distributed under the Boost Software License, Version 1.0; see doc/license.txt.
@n Copyright Mikhail K Levin 2013
*******************************************************************************/
#include "boost/python.hpp"
namespace bp = boost::python;
#include "owlcpp/ns_id.hpp"
#include "owlcpp/node_id.hpp"
#include "owlcpp/doc_id.hpp"
using owlcpp::Node_id;
using owlcpp::Doc_id;
using owlcpp::Ns_id;
void export_ids() {
bp::class_<Ns_id>("Ns_id", bp::init<unsigned>())
.def(str(bp::self))
.def(bp::self < bp::self)
.def(bp::self > bp::self)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
.def("__call__", &Ns_id::operator())
;
bp::class_<Doc_id>("Doc_id", bp::init<unsigned>())
.def(str(bp::self))
.def(bp::self < bp::self)
.def(bp::self > bp::self)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
.def("__call__", &Doc_id::operator())
;
bp::class_<Node_id>("Node_id", bp::init<unsigned>())
.def(str(bp::self))
.def(bp::self < bp::self)
.def(bp::self > bp::self)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
.def("__call__", &Node_id::operator())
;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.