ProfilerEntity.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package MemoryX::Core::MemoryTypes
19  * @author Manfred Kroehnert (Manfred dot Kroehnert at kit dot edu)
20  * @date 2015
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 #include <MemoryX/interface/core/EntityBase.h>
28 #include <MemoryX/interface/memorytypes/ProfilerEntities.h>
30 
31 namespace memoryx
32 {
33  class ProfilerEntity;
35 
37  virtual public memoryx::ProfilerEntityBase,
38  virtual public memoryx::Entity
39  {
40  public:
43  ~ProfilerEntity() override;
44 
45 
46  // cloning
47  Ice::ObjectPtr ice_clone() const override;
48  ProfilerEntityPtr clone(const Ice::Current& c = Ice::emptyCurrent) const;
49 
50  // interface
51  Ice::StringSeq getTags(const Ice::Current& context = Ice::emptyCurrent) const override;
52  void setTags(const Ice::StringSeq& tags, const Ice::Current& context = Ice::emptyCurrent) override;
53  void addTag(const std::string& tag, const Ice::Current& context = Ice::emptyCurrent) override;
54 
55  private:
56  void output(std::ostream& stream) const;
57 
58  public:
59  // streaming operator
60  friend std::ostream& operator<<(std::ostream& stream, const ProfilerEntity& rhs)
61  {
62  rhs.output(stream);
63  return stream;
64  }
65 
66  friend std::ostream& operator<<(std::ostream& stream, const ProfilerEntityPtr& rhs)
67  {
68  rhs->output(stream);
69  return stream;
70  }
71 
72  friend std::ostream& operator<<(std::ostream& stream, const ProfilerEntityBasePtr& rhs)
73  {
74  stream << ProfilerEntityPtr::dynamicCast(rhs);
75  return stream;
76  }
77  };
78 
79 }
80 
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::ProfilerEntity
Definition: ProfilerEntity.h:36
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::ProfilerEntity::getTags
Ice::StringSeq getTags(const Ice::Current &context=Ice::emptyCurrent) const override
Definition: ProfilerEntity.cpp:89
memoryx::ProfilerEntity::addTag
void addTag(const std::string &tag, const Ice::Current &context=Ice::emptyCurrent) override
Definition: ProfilerEntity.cpp:83
memoryx::ProfilerEntity::operator<<
friend std::ostream & operator<<(std::ostream &stream, const ProfilerEntityBasePtr &rhs)
Definition: ProfilerEntity.h:72
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:681
memoryx::ProfilerEntity::ProfilerEntity
ProfilerEntity()
Definition: ProfilerEntity.cpp:31
memoryx::ProfilerEntity::operator<<
friend std::ostream & operator<<(std::ostream &stream, const ProfilerEntityPtr &rhs)
Definition: ProfilerEntity.h:66
Entity.h
memoryx::ProfilerEntity::setTags
void setTags(const Ice::StringSeq &tags, const Ice::Current &context=Ice::emptyCurrent) override
Definition: ProfilerEntity.cpp:74
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::ProfilerEntity::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: ProfilerEntity.cpp:59
memoryx::Entity
Definition: Entity.h:246
memoryx::ProfilerEntity::operator<<
friend std::ostream & operator<<(std::ostream &stream, const ProfilerEntity &rhs)
Definition: ProfilerEntity.h:60
memoryx::ProfilerEntity::~ProfilerEntity
~ProfilerEntity() override
Definition: ProfilerEntity.cpp:48
memoryx::ProfilerEntity::clone
ProfilerEntityPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: ProfilerEntity.cpp:65