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 
28 namespace memoryx::VariantType
29 {
31  armarx::Variant::addTypeName("::memoryx::SECRelationBase");
32 }
33 
34 namespace memoryx
35 {
36  class SECRelation : public memoryx::SECRelationBase
37  {
38  public:
39  SECRelation();
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:
121  LeftToRelation();
122  LeftToRelation(const ObjectClassList& possibleObjects1,
123  const ObjectClassList& possibleObjects2);
124  LeftToRelation(const ObjectClassBasePtr& possibleObject1,
125  const ObjectClassBasePtr& possibleObject2);
126  };
127 
129  {
130  public:
131  RightToRelation();
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 
141 namespace memoryx
142 {
144 }
memoryx::SECRelation::SECRelation
SECRelation()
Definition: SECRelation.cpp:34
memoryx::Relations::LeftToRelation::LeftToRelation
LeftToRelation()
Definition: SECRelation.cpp:216
memoryx::SECRelation::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: SECRelation.cpp:61
memoryx::SECRelation::_isEqual
bool _isEqual(const SECRelationBasePtr &other, bool ignoreName=false, bool reversed=false) const
Definition: SECRelation.cpp:109
memoryx::VariantType
Definition: Affordance.h:31
memoryx::SECRelation::serialize
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:288
memoryx::Relations::TouchingRelation
Definition: SECRelation.h:98
memoryx::Relations::NoConnectionRelation
Definition: SECRelation.h:88
memoryx::Relations::RightToRelation
Definition: SECRelation.h:128
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
memoryx::Relations::TouchingRelation::TouchingRelation
TouchingRelation()
Definition: SECRelation.cpp:182
memoryx::SECRelation::clone
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:251
memoryx::Relations::NoConnectionRelation::NoConnectionRelation
NoConnectionRelation()
Definition: SECRelation.cpp:164
memoryx::Relations::BehindOfRelation::BehindOfRelation
BehindOfRelation()
Definition: SECRelation.cpp:199
memoryx::SECRelation::isEqual
bool isEqual(const SECRelationBasePtr &other, bool ignoreName) const
Definition: SECRelation.cpp:67
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::SECRelation::hasEqualObjects
bool hasEqualObjects(const SECRelationBasePtr &other, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:79
memoryx::SECRelation::objects1ToString
std::string objects1ToString() const
Definition: SECRelation.cpp:97
memoryx::Relations::LeftToRelation
Definition: SECRelation.h:118
memoryx::SECRelation
Definition: SECRelation.h:36
memoryx::SECRelation::validate
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:282
armarx::VariantTypeId
Ice::Int VariantTypeId
Definition: Variant.h:43
memoryx::Relations::BehindOfRelation
Definition: SECRelation.h:108
memoryx::Relations
Definition: SECRelation.h:86
memoryx::SECRelation::output
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:270
Entity.h
memoryx::SECRelation::deserialize
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:299
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:917
memoryx::SECRelation::getName
std::string getName(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:85
memoryx::SECRelation::getType
Ice::Int getType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:276
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::SECRelation::setName
void setName(const std::string &name, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:91
memoryx::SECRelation::objects2ToString
std::string objects2ToString() const
Definition: SECRelation.cpp:103
armarx::Variant::addTypeName
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
Definition: Variant.cpp:869
memoryx::Relations::RightToRelation::RightToRelation
RightToRelation()
Definition: SECRelation.cpp:233