SECObjectRelations.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 #pragma once
23 
24 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
26 
27 namespace memoryx::VariantType
28 {
29  const armarx::VariantTypeId SECObjectRelations = armarx::Variant::addTypeName("::memoryx::SECObjectRelationsBase");
30 }
31 
32 namespace memoryx
33 {
34  class SECObjectRelations : public SECObjectRelationsBase
35  {
36  public:
38  // cloning
39  Ice::ObjectPtr ice_clone() const override;
40 
41  // SECObjectRelationsBase interface
42  Ice::Float contains(const SECObjectRelationsBasePtr& other, const Ice::Current& c = Ice::emptyCurrent) const override;
43  bool containsRelation(const SECRelationBasePtr& relation, const Ice::Current& c = Ice::emptyCurrent) const override;
44  Ice::Int addRelations(const SECRelationList& newRelations, const Ice::Current& c = Ice::emptyCurrent) override;
45  bool addRelation(const SECRelationBasePtr& newRelation, const Ice::Current& c = Ice::emptyCurrent) override;
46  SECRelationBasePtr containsRelationBetweenObjects(const ObjectClassList& objects1, const ObjectClassList& objects2, const Ice::Current& c = Ice::emptyCurrent) const override;
47  ObjectClassList getObjectsInRelation(const SECRelationBasePtr& relation, ObjectClassBasePtr object1);
48  bool isEqual(const SECObjectRelations& relations) const;
49 
50  // VariantDataClass interface
51  public:
52  armarx::VariantDataClassPtr clone(const Ice::Current& c = Ice::emptyCurrent) const override;
53  std::string output(const Ice::Current& c = Ice::emptyCurrent) const override;
54  Ice::Int getType(const Ice::Current& c = Ice::emptyCurrent) const override;
55  bool validate(const Ice::Current& c = Ice::emptyCurrent) override;
56 
57  // Serializable interface
58  public:
59  void serialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c = Ice::emptyCurrent) const override;
60  void deserialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c = Ice::emptyCurrent) override;
61  };
63 
64 }
65 
memoryx::SECObjectRelations::validate
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECObjectRelations.cpp:192
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:918
memoryx::VariantType
Definition: Affordance.h:32
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::SECObjectRelations::deserialize
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECObjectRelations.cpp:212
memoryx::SECObjectRelations::isEqual
bool isEqual(const SECObjectRelations &relations) const
Definition: SECObjectRelations.cpp:161
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::SECObjectRelations::contains
Ice::Float contains(const SECObjectRelationsBasePtr &other, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:54
memoryx::SECObjectRelations::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: SECObjectRelations.cpp:49
memoryx::SECObjectRelations::getObjectsInRelation
ObjectClassList getObjectsInRelation(const SECRelationBasePtr &relation, ObjectClassBasePtr object1)
Definition: SECObjectRelations.cpp:143
memoryx::SECObjectRelations::SECObjectRelations
SECObjectRelations()
Definition: SECObjectRelations.cpp:33
memoryx::SECObjectRelations::getType
Ice::Int getType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:187
armarx::VariantTypeId
Ice::Int VariantTypeId
Definition: Variant.h:44
memoryx::SECObjectRelations
Definition: SECObjectRelations.h:34
memoryx::SECObjectRelations::clone
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:37
Entity.h
memoryx::SECObjectRelations::serialize
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:197
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
memoryx::SECObjectRelations::output
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:175
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::SECObjectRelations::containsRelationBetweenObjects
SECRelationBasePtr containsRelationBetweenObjects(const ObjectClassList &objects1, const ObjectClassList &objects2, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:127
memoryx::SECObjectRelations::addRelation
bool addRelation(const SECRelationBasePtr &newRelation, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECObjectRelations.cpp:120
memoryx::SECObjectRelations::containsRelation
bool containsRelation(const SECRelationBasePtr &relation, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: SECObjectRelations.cpp:82
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::SECObjectRelations::addRelations
Ice::Int addRelations(const SECRelationList &newRelations, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SECObjectRelations.cpp:97