SpecializedSegment.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
RobotAPI/libraries/armem/server/forward_declarations.h
>
4
#include <
RobotAPI/libraries/armem/server/wm/memory_definitions.h
>
5
6
#include <
RobotAPI/libraries/aron/core/type/variant/forward_declarations.h
>
7
8
#include <
ArmarXCore/core/logging/Logging.h
>
9
#include <
ArmarXCore/core/application/properties/forward_declarations.h
>
10
11
#include <string>
12
13
14
namespace
armarx::armem::server::segment
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>
24
class
SegmentBase
:
public
armarx::Logging
25
{
26
public
:
27
28
SegmentBase
() =
delete
;
29
SegmentBase
(
MemoryToIceAdapter
&
iceMemory
) :
30
iceMemory
(
iceMemory
)
31
{
32
Logging::setTag
(
"armarx::armem::Segment"
);
33
}
34
35
MemoryID
&
id
()
36
{
37
ARMARX_CHECK_NOT_NULL
(
segmentPtr
);
38
return
segmentPtr
->id();
39
}
40
41
const
MemoryID
&
id
()
const
42
{
43
ARMARX_CHECK_NOT_NULL
(
segmentPtr
);
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
60
MemoryToIceAdapter
&
iceMemory
;
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
RobotAPI
libraries
armem
server
segment
detail
SpecializedSegment.h
Generated on Sat Oct 12 2024 09:14:08 for armarx_documentation by
1.8.17