6 #include "knowrob/reasoner/ReasonerEvent.h"
7 #include "knowrob/integration/python/utils.h"
14 for (
auto &triple: triples) {
21 :
Event(eventType), triples_(tripleCount) {
31 void createType<reasoner::Event>() {
41 enum_<ReasonerEventType>(
"ReasonerEventType")
42 .value(
"Assertion", ReasonerEventType::Assertion)
43 .value(
"Retraction", ReasonerEventType::Retraction)
44 .value(
"Replacement", ReasonerEventType::Replacement)
45 .value(
"Invalidation", ReasonerEventType::Invalidation)
48 class_<ReasonerEvent, std::shared_ptr<ReasonerEvent>, boost::noncopyable>
49 (
"ReasonerEvent", no_init)
50 .def(
"eventType", &ReasonerEvent::eventType);
52 class_<TripleEvent, bases<ReasonerEvent>, std::shared_ptr<TripleEvent>, boost::noncopyable>
53 (
"TripleEvent", no_init)
57 class_<AssertionEvent, std::shared_ptr<AssertionEvent>, bases<TripleEvent>, boost::noncopyable>
58 (
"AssertionEvent", init<uint32_t, bool>())
59 .def(init<uint32_t>());
61 class_<RetractionEvent, std::shared_ptr<RetractionEvent>, bases<TripleEvent>, boost::noncopyable>
62 (
"RetractionEvent", init<uint32_t, bool>())
63 .def(init<uint32_t>());
65 class_<ReplacementEvent, std::shared_ptr<ReplacementEvent>, bases<TripleEvent>, boost::noncopyable>
66 (
"ReplacementEvent", init<uint32_t, bool>())
67 .def(init<uint32_t>());
69 class_<InvalidationEvent, std::shared_ptr<InvalidationEvent>, bases<ReasonerEvent>, boost::noncopyable>
70 (
"InvalidationEvent", init<>());
void createTriples(std::vector< TriplePtr > &triples)
auto & triple(uint32_t index)
TripleEvent(Type eventType, uint32_t tripleCount, bool copy=true)
std::vector< TriplePtr > triples_