SpecializedSegment.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
7
11
13{
14 namespace detail
15 {
16 /**
17 * @brief A base class for memory servers to manage their segments.
18 * A segment can inherit this base class and add segment specific code.
19 * TODO (fabian.peller): add concept to only accept coresegments, providersegments or entitysegments
20 */
21 template <class SegmentType>
23 {
24 public:
25 SegmentBase() = delete;
26
28 {
29 Logging::setTag("armarx::armem::Segment");
30 }
31
34 {
36 return segmentPtr->id();
37 }
38
39 const MemoryID&
40 id() const
41 {
43 return segmentPtr->id();
44 }
45
46 virtual ~SegmentBase() = default;
47
49 const std::string& prefix = "") = 0;
50 virtual void init() = 0;
51
52 public:
53 SegmentType* segmentPtr;
54
55
56 protected:
57 // Memory connection
59 };
60 } // namespace detail
61} // namespace armarx::armem::server::segment
Base Class for all Logging classes.
Definition Logging.h:240
void setTag(const LogTag &tag)
Definition Logging.cpp:54
Helps connecting a Memory server to the Ice interface.
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="")=0
#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...
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.