DMPEntity.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::Core
17* @author Alexey Kozlov ( kozlov at kit dot edu)
18* @date 2012
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
26
28#include <MemoryX/interface/core/EntityBase.h>
29#include <MemoryX/interface/memorytypes/MemoryEntities.h>
30
31namespace memoryx
32{
33
34 class DMPEntity;
36
37 class DMPEntity : public memoryx::DMPEntityBase, public memoryx::Entity
38 {
39 public:
40 DMPEntity();
41 DMPEntity(const DMPEntity& source);
42 DMPEntity(const std::string& name, const std::string& id = "");
43 ~DMPEntity() override;
44
45 void setDMPName(const std::string& dmpName,
46 const ::Ice::Current& = Ice::emptyCurrent) override;
47 std::string getDMPName(const ::Ice::Current& = Ice::emptyCurrent) const override;
48 void setDMPType(const std::string& dmpType,
49 const ::Ice::Current& = Ice::emptyCurrent) override;
50 int getDMPType(const ::Ice::Current& = Ice::emptyCurrent) const override;
51 void setDMPtextStr(const std::string& dmptext,
52 const ::Ice::Current& = Ice::emptyCurrent) override;
53 std::string getDMPtextStr(const ::Ice::Current& = Ice::emptyCurrent) const override;
54 void set3rdOrder(const bool is3rdOrder, const ::Ice::Current& = Ice::emptyCurrent) override;
55 bool get3rdOrder(const ::Ice::Current& = Ice::emptyCurrent) const override;
56 void setTrajDim(const int trajdim, const ::Ice::Current& = Ice::emptyCurrent) override;
57 int getTrajDim(const ::Ice::Current& = Ice::emptyCurrent) const override;
58
59 // cloning
60 Ice::ObjectPtr ice_clone() const override;
61 DMPEntityPtr clone(const Ice::Current& c = Ice::emptyCurrent) const;
62
63 private:
64 void output(std::ostream& stream) const;
65
66 public: // streaming operator
67 friend std::ostream&
68 operator<<(std::ostream& stream, const DMPEntity& rhs)
69 {
70 rhs.output(stream);
71 return stream;
72 }
73
74 friend std::ostream&
75 operator<<(std::ostream& stream, const DMPEntityPtr& rhs)
76 {
77 rhs->output(stream);
78 return stream;
79 }
80
81 friend std::ostream&
82 operator<<(std::ostream& stream, const DMPEntityBasePtr& rhs)
83 {
84 stream << DMPEntityPtr::dynamicCast(rhs);
85 return stream;
86 }
87 };
88
89} // namespace memoryx
constexpr T c
bool get3rdOrder(const ::Ice::Current &=Ice::emptyCurrent) const override
DMPEntityPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
void set3rdOrder(const bool is3rdOrder, const ::Ice::Current &=Ice::emptyCurrent) override
Definition DMPEntity.cpp:77
void setDMPName(const std::string &dmpName, const ::Ice::Current &=Ice::emptyCurrent) override
Definition DMPEntity.cpp:59
void setDMPType(const std::string &dmpType, const ::Ice::Current &=Ice::emptyCurrent) override
Definition DMPEntity.cpp:65
friend std::ostream & operator<<(std::ostream &stream, const DMPEntity &rhs)
Definition DMPEntity.h:68
std::string getDMPtextStr(const ::Ice::Current &=Ice::emptyCurrent) const override
int getDMPType(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition DMPEntity.cpp:95
Ice::ObjectPtr ice_clone() const override
void setDMPtextStr(const std::string &dmptext, const ::Ice::Current &=Ice::emptyCurrent) override
Definition DMPEntity.cpp:71
std::string getDMPName(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition DMPEntity.cpp:89
int getTrajDim(const ::Ice::Current &=Ice::emptyCurrent) const override
~DMPEntity() override
Definition DMPEntity.cpp:53
void setTrajDim(const int trajdim, const ::Ice::Current &=Ice::emptyCurrent) override
Definition DMPEntity.cpp:83
Entity is the superclass for all MemoryX memory chunks.
Definition Entity.h:246
VirtualRobot headers.
IceInternal::Handle< DMPEntity > DMPEntityPtr
Definition DMPEntity.h:35