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 
31 namespace 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
memoryx::DMPEntity::DMPEntity
DMPEntity()
Definition: DMPEntity.cpp:30
memoryx::DMPEntity::clone
DMPEntityPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: DMPEntity.cpp:131
memoryx::DMPEntity::setDMPType
void setDMPType(const std::string &dmpType, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: DMPEntity.cpp:65
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
memoryx::DMPEntity::setDMPtextStr
void setDMPtextStr(const std::string &dmptext, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: DMPEntity.cpp:71
memoryx::DMPEntity::setDMPName
void setDMPName(const std::string &dmpName, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: DMPEntity.cpp:59
memoryx::DMPEntity::getDMPName
std::string getDMPName(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: DMPEntity.cpp:89
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::DMPEntity
Definition: DMPEntity.h:37
memoryx::DMPEntity::~DMPEntity
~DMPEntity() override
Definition: DMPEntity.cpp:53
memoryx::DMPEntity::setTrajDim
void setTrajDim(const int trajdim, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: DMPEntity.cpp:83
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:661
Entity.h
memoryx::DMPEntity::getDMPtextStr
std::string getDMPtextStr(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: DMPEntity.cpp:101
memoryx::DMPEntity::getTrajDim
int getTrajDim(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: DMPEntity.cpp:113
memoryx::DMPEntity::set3rdOrder
void set3rdOrder(const bool is3rdOrder, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: DMPEntity.cpp:77
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::DMPEntity::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: DMPEntity.cpp:125
memoryx::DMPEntity::operator<<
friend std::ostream & operator<<(std::ostream &stream, const DMPEntity &rhs)
Definition: DMPEntity.h:68
memoryx::Entity
Definition: Entity.h:245
Variant.h
memoryx::DMPEntity::getDMPType
int getDMPType(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: DMPEntity.cpp:95
memoryx::DMPEntity::get3rdOrder
bool get3rdOrder(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: DMPEntity.cpp:107