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
25 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
26 
28 
29 namespace memoryx::VariantType
30 {
31  const armarx::VariantTypeId SECRelation = armarx::Variant::addTypeName("::memoryx::SECRelationBase");
32 }
33 
34 namespace memoryx
35 {
36  class SECRelation :
37  public memoryx::SECRelationBase
38  {
39  public:
40  SECRelation();
41  SECRelation(const std::string& relationName, const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
42  SECRelation(const std::string& relationName, const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
43 
44  // cloning
45  Ice::ObjectPtr ice_clone() const override;
46 
47  bool isEqual(const SECRelationBasePtr& other, bool ignoreName) const;
48 
49 
50  // SECRelationBase interface
51  bool isEqual(const SECRelationBasePtr& other, const Ice::Current& c = Ice::emptyCurrent) const override;
52  bool hasEqualObjects(const SECRelationBasePtr& other, const Ice::Current& c = Ice::emptyCurrent) override;
53  std::string getName(const Ice::Current& c = Ice::emptyCurrent) const override;
54  void setName(const std::string& name, const Ice::Current& c = Ice::emptyCurrent) override;
55 
56  std::string objects1ToString() const;
57  std::string objects2ToString() const;
58 
59 
60  // VariantDataClass interface
61  public:
62  armarx::VariantDataClassPtr clone(const Ice::Current& c = Ice::emptyCurrent) const override;
63  std::string output(const Ice::Current& c = Ice::emptyCurrent) const override;
64  Ice::Int getType(const Ice::Current& c = Ice::emptyCurrent) const override;
65  bool validate(const Ice::Current& c = Ice::emptyCurrent) override;
66 
67  // Serializable interface
68  public:
69  void serialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c = Ice::emptyCurrent) const override;
70  void deserialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c = Ice::emptyCurrent) override;
71 
72  protected:
73  bool _isEqual(const SECRelationBasePtr& other, bool ignoreName = false, bool reversed = false) const;
74 
75  };
76 }
77 
79 {
81  {
82  public:
84  NoConnectionRelation(const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
85  NoConnectionRelation(const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
86  };
87 
89  {
90  public:
92  TouchingRelation(const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
93  TouchingRelation(const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
94  };
95 
97  {
98  public:
100  BehindOfRelation(const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
101  BehindOfRelation(const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
102  };
103 
105  {
106  public:
107  LeftToRelation();
108  LeftToRelation(const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
109  LeftToRelation(const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
110  };
111 
113  {
114  public:
115  RightToRelation();
116  RightToRelation(const ObjectClassList& possibleObjects1, const ObjectClassList& possibleObjects2);
117  RightToRelation(const ObjectClassBasePtr& possibleObject1, const ObjectClassBasePtr& possibleObject2);
118  };
119 
120 
121 }
122 
123 namespace memoryx
124 {
126 }
memoryx::SECRelation::SECRelation
SECRelation()
Definition: SECRelation.cpp:34
memoryx::Relations::LeftToRelation::LeftToRelation
LeftToRelation()
Definition: SECRelation.cpp:199
memoryx::SECRelation::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: SECRelation.cpp:56
memoryx::SECRelation::_isEqual
bool _isEqual(const SECRelationBasePtr &other, bool ignoreName=false, bool reversed=false) const
Definition: SECRelation.cpp:102
memoryx::VariantType
Definition: Affordance.h:32
memoryx::SECRelation::serialize
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:265
memoryx::Relations::TouchingRelation
Definition: SECRelation.h:88
memoryx::Relations::NoConnectionRelation
Definition: SECRelation.h:80
memoryx::Relations::RightToRelation
Definition: SECRelation.h:112
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::Relations::TouchingRelation::TouchingRelation
TouchingRelation()
Definition: SECRelation.cpp:167
memoryx::SECRelation::clone
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:232
memoryx::Relations::NoConnectionRelation::NoConnectionRelation
NoConnectionRelation()
Definition: SECRelation.cpp:150
memoryx::Relations::BehindOfRelation::BehindOfRelation
BehindOfRelation()
Definition: SECRelation.cpp:183
memoryx::SECRelation::isEqual
bool isEqual(const SECRelationBasePtr &other, bool ignoreName) const
Definition: SECRelation.cpp:61
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:71
memoryx::SECRelation::objects1ToString
std::string objects1ToString() const
Definition: SECRelation.cpp:89
memoryx::Relations::LeftToRelation
Definition: SECRelation.h:104
memoryx::SECRelation
Definition: SECRelation.h:36
memoryx::SECRelation::validate
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:260
armarx::VariantTypeId
Ice::Int VariantTypeId
Definition: Variant.h:44
memoryx::Relations::BehindOfRelation
Definition: SECRelation.h:96
memoryx::Relations
Definition: SECRelation.h:78
memoryx::SECRelation::output
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:250
Entity.h
memoryx::SECRelation::deserialize
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECRelation.cpp:273
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
memoryx::SECRelation::getName
std::string getName(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:76
memoryx::SECRelation::getType
Ice::Int getType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECRelation.cpp:255
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:82
memoryx::SECRelation::objects2ToString
std::string objects2ToString() const
Definition: SECRelation.cpp:94
armarx::Variant::addTypeName
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
Definition: Variant.cpp:751
memoryx::Relations::RightToRelation::RightToRelation
RightToRelation()
Definition: SECRelation.cpp:215