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
28#include <MemoryX/interface/core/EntityBase.h>
29#include <MemoryX/interface/memorytypes/ProfilerEntities.h>
30
31namespace memoryx
32{
33 class ProfilerEntity;
35
37 virtual public memoryx::ProfilerEntityBase,
38 virtual public memoryx::Entity
39 {
40 public:
42 ProfilerEntity(const ProfilerEntity& source);
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,
53 const Ice::Current& context = Ice::emptyCurrent) override;
54 void addTag(const std::string& tag,
55 const Ice::Current& context = Ice::emptyCurrent) override;
56
57 private:
58 void output(std::ostream& stream) const;
59
60 public:
61 // streaming operator
62 friend std::ostream&
63 operator<<(std::ostream& stream, const ProfilerEntity& rhs)
64 {
65 rhs.output(stream);
66 return stream;
67 }
68
69 friend std::ostream&
70 operator<<(std::ostream& stream, const ProfilerEntityPtr& rhs)
71 {
72 rhs->output(stream);
73 return stream;
74 }
75
76 friend std::ostream&
77 operator<<(std::ostream& stream, const ProfilerEntityBasePtr& rhs)
78 {
79 stream << ProfilerEntityPtr::dynamicCast(rhs);
80 return stream;
81 }
82 };
83
84} // namespace memoryx
constexpr T c
Entity is the superclass for all MemoryX memory chunks.
Definition Entity.h:246
void addTag(const std::string &tag, const Ice::Current &context=Ice::emptyCurrent) override
Ice::StringSeq getTags(const Ice::Current &context=Ice::emptyCurrent) const override
void setTags(const Ice::StringSeq &tags, const Ice::Current &context=Ice::emptyCurrent) override
ProfilerEntityPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Ice::ObjectPtr ice_clone() const override
friend std::ostream & operator<<(std::ostream &stream, const ProfilerEntity &rhs)
VirtualRobot headers.
IceInternal::Handle< ProfilerEntity > ProfilerEntityPtr