knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
GraphUnion.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of KnowRob, please consult
3
* https://github.com/knowrob/knowrob for license details.
4
*/
5
6
#include "knowrob/semweb/GraphUnion.h"
7
#include "knowrob/integration/python/utils.h"
8
9
using namespace
knowrob
;
10
11
void
GraphUnion::write
(std::ostream &os)
const
{
12
os <<
"Union("
;
13
for
(std::size_t i = 0; i <
terms_
.size(); i++) {
14
if
(i > 0) {
15
os <<
", "
;
16
}
17
os << *
terms_
[i];
18
}
19
os <<
")"
;
20
}
21
22
namespace
knowrob::py
{
23
template
<>
24
void
createType<GraphUnion>
() {
25
using namespace
boost::python
;
26
27
class_<GraphUnion, bases<GraphTerm>, std::shared_ptr<GraphUnion>, boost::noncopyable>
28
(
"GraphUnion"
, init<>())
29
.def(init<
const
std::vector<std::shared_ptr<GraphTerm>> &>());
30
}
31
}
knowrob::GraphConnective::terms_
std::vector< std::shared_ptr< GraphTerm > > terms_
Definition:
GraphConnective.h:42
knowrob::GraphUnion::write
void write(std::ostream &os) const override
Definition:
GraphUnion.cpp:11
boost::python
Definition:
shared_ptr.cpp:13
knowrob::py
Definition:
dict.h:10
knowrob::py::createType< GraphUnion >
void createType< GraphUnion >()
Definition:
GraphUnion.cpp:24
knowrob
Definition:
DataSource.h:13
src
semweb
GraphUnion.cpp
Generated by
1.9.1