SpecializedSegment.h
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
10 
11 #include <string>
12 
13 
15 {
16  namespace detail
17  {
18  /**
19  * @brief A base class for memory servers to manage their segments.
20  * A segment can inherit this base class and add segment specific code.
21  * TODO (fabian.peller): add concept to only accept coresegments, providersegments or entitysegments
22  */
23  template <class SegmentType>
25  {
26  public:
27 
28  SegmentBase() = delete;
31  {
32  Logging::setTag("armarx::armem::Segment");
33  }
34 
36  {
38  return segmentPtr->id();
39  }
40 
41  const MemoryID& id() const
42  {
44  return segmentPtr->id();
45  }
46 
47  virtual ~SegmentBase() = default;
48 
49  virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix = "") = 0;
50  virtual void init() = 0;
51 
52  public:
53 
54  SegmentType* segmentPtr;
55 
56 
57  protected:
58 
59  // Memory connection
61  };
62  }
63 }
armarx::armem::server::segment::detail::SegmentBase::id
const MemoryID & id() const
Definition: SpecializedSegment.h:41
armarx::armem::server::MemoryToIceAdapter
Helps connecting a Memory server to the Ice interface.
Definition: MemoryToIceAdapter.h:19
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
detail
Definition: OpenCVUtil.cpp:127
armarx::armem::server::segment::detail::SegmentBase::~SegmentBase
virtual ~SegmentBase()=default
memory_definitions.h
armarx::armem::server::segment::detail::SegmentBase::segmentPtr
SegmentType * segmentPtr
Definition: SpecializedSegment.h:54
armarx::armem::server::segment::detail::SegmentBase::defineProperties
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="")=0
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::armem::server::segment::detail::SegmentBase::SegmentBase
SegmentBase(MemoryToIceAdapter &iceMemory)
Definition: SpecializedSegment.h:29
armarx::armem::server::segment::detail::SegmentBase
A base class for memory servers to manage their segments.
Definition: SpecializedSegment.h:24
armarx::armem::server::segment::detail::SegmentBase::SegmentBase
SegmentBase()=delete
armarx::armem::server::segment::detail::SegmentBase::init
virtual void init()=0
forward_declarations.h
armarx::armem::server::segment
Definition: constants.h:1
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:232
armarx::armem::server::segment::detail::SegmentBase::iceMemory
MemoryToIceAdapter & iceMemory
Definition: SpecializedSegment.h:60
forward_declarations.h
IceUtil::Handle< class PropertyDefinitionContainer >
forward_declarations.h
armarx::armem::server::segment::detail::SegmentBase::id
MemoryID & id()
Definition: SpecializedSegment.h:35
armarx::Logging::setTag
void setTag(const LogTag &tag)
Definition: Logging.cpp:55
Logging.h