SECRelation.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package MemoryX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2013
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23
24#pragma once
26#include <MemoryX/interface/memorytypes/MemoryEntities.h>
27
29{
31 armarx::Variant::addTypeName("::memoryx::SECRelationBase");
32}
33
34namespace memoryx
35{
36 class SECRelation : public memoryx::SECRelationBase
37 {
38 public:
40 SECRelation(const std::string& relationName,
41 const ObjectClassList& possibleObjects1,
42 const ObjectClassList& possibleObjects2);
43 SECRelation(const std::string& relationName,
44 const ObjectClassBasePtr& possibleObject1,
45 const ObjectClassBasePtr& possibleObject2);
46
47 // cloning
48 Ice::ObjectPtr ice_clone() const override;
49
50 bool isEqual(const SECRelationBasePtr& other, bool ignoreName) const;
51
52
53 // SECRelationBase interface
54 bool isEqual(const SECRelationBasePtr& other,
55 const Ice::Current& c = Ice::emptyCurrent) const override;
56 bool hasEqualObjects(const SECRelationBasePtr& other,
57 const Ice::Current& c = Ice::emptyCurrent) override;
58 std::string getName(const Ice::Current& c = Ice::emptyCurrent) const override;
59 void setName(const std::string& name, const Ice::Current& c = Ice::emptyCurrent) override;
60
61 std::string objects1ToString() const;
62 std::string objects2ToString() const;
63
64
65 // VariantDataClass interface
66 public:
67 armarx::VariantDataClassPtr clone(const Ice::Current& c = Ice::emptyCurrent) const override;
68 std::string output(const Ice::Current& c = Ice::emptyCurrent) const override;
69 Ice::Int getType(const Ice::Current& c = Ice::emptyCurrent) const override;
70 bool validate(const Ice::Current& c = Ice::emptyCurrent) override;
71
72 // Serializable interface
73 public:
74 void serialize(const armarx::ObjectSerializerBasePtr& serializer,
75 const Ice::Current& c = Ice::emptyCurrent) const override;
76 void deserialize(const armarx::ObjectSerializerBasePtr& serializer,
77 const Ice::Current& c = Ice::emptyCurrent) override;
78
79 protected:
80 bool _isEqual(const SECRelationBasePtr& other,
81 bool ignoreName = false,
82 bool reversed = false) const;
83 };
84} // namespace memoryx
85
87{
89 {
90 public:
92 NoConnectionRelation(const ObjectClassList& possibleObjects1,
93 const ObjectClassList& possibleObjects2);
94 NoConnectionRelation(const ObjectClassBasePtr& possibleObject1,
95 const ObjectClassBasePtr& possibleObject2);
96 };
97
99 {
100 public:
102 TouchingRelation(const ObjectClassList& possibleObjects1,
103 const ObjectClassList& possibleObjects2);
104 TouchingRelation(const ObjectClassBasePtr& possibleObject1,
105 const ObjectClassBasePtr& possibleObject2);
106 };
107
109 {
110 public:
112 BehindOfRelation(const ObjectClassList& possibleObjects1,
113 const ObjectClassList& possibleObjects2);
114 BehindOfRelation(const ObjectClassBasePtr& possibleObject1,
115 const ObjectClassBasePtr& possibleObject2);
116 };
117
119 {
120 public:
122 LeftToRelation(const ObjectClassList& possibleObjects1,
123 const ObjectClassList& possibleObjects2);
124 LeftToRelation(const ObjectClassBasePtr& possibleObject1,
125 const ObjectClassBasePtr& possibleObject2);
126 };
127
129 {
130 public:
132 RightToRelation(const ObjectClassList& possibleObjects1,
133 const ObjectClassList& possibleObjects2);
134 RightToRelation(const ObjectClassBasePtr& possibleObject1,
135 const ObjectClassBasePtr& possibleObject2);
136 };
137
138
139} // namespace memoryx::Relations
140
141namespace memoryx
142{
144}
constexpr T c
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
Definition Variant.cpp:869
std::string objects2ToString() const
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
bool hasEqualObjects(const SECRelationBasePtr &other, const Ice::Current &c=Ice::emptyCurrent) override
SECRelation(const std::string &relationName, const ObjectClassList &possibleObjects1, const ObjectClassList &possibleObjects2)
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) const override
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
void setName(const std::string &name, const Ice::Current &c=Ice::emptyCurrent) override
std::string getName(const Ice::Current &c=Ice::emptyCurrent) const override
bool _isEqual(const SECRelationBasePtr &other, bool ignoreName=false, bool reversed=false) const
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
std::string objects1ToString() const
Ice::Int getType(const Ice::Current &c=Ice::emptyCurrent) const override
Ice::ObjectPtr ice_clone() const override
bool isEqual(const SECRelationBasePtr &other, bool ignoreName) const
Ice::Int VariantTypeId
Definition Variant.h:43
const armarx::VariantTypeId SECRelation
Definition SECRelation.h:30
VirtualRobot headers.
IceInternal::Handle< SECRelation > SECRelationPtr