Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#pragma once
#include <mutex>
#include <string>
#include <ArmarXCore/core/application/properties/forward_declarations.h>
#include <ArmarXCore/core/logging/Logging.h>
namespace armarx::aron::typenavigator
{
using ObjectNavigatorPtr = std::shared_ptr<class ObjectNavigator>;
}
namespace armarx::armem
{
namespace server
{
class MemoryToIceAdapter;
}
namespace wm
{
class CoreSegment;
}
}
namespace armarx::armem::server::segment
{
/**
* @brief Specialized management of a core segment.
*/
class SpecializedSegment :
public armarx::Logging
{
public:
SpecializedSegment(
server::MemoryToIceAdapter& iceMemory,
aron::typenavigator::ObjectNavigatorPtr aronType = nullptr,
const std::string& defaultCoreSegmentName = "",
int64_t defaultMaxHistorySize = -1);
virtual ~SpecializedSegment();
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix = "");
virtual void init();
// void connect();
std::mutex& mutex() const;
protected:
void setDefaultCoreSegmentName(const std::string& coreSegmentName);
void setDefaultMaxHistorySize(int64_t maxHistorySize);
void setAronType(aron::typenavigator::ObjectNavigatorPtr aronType);
protected:
server::MemoryToIceAdapter& iceMemory;
wm::CoreSegment* coreSegment = nullptr;
aron::typenavigator::ObjectNavigatorPtr aronType;
struct Properties
{
std::string coreSegmentName = "";
int64_t maxHistorySize = -1;
};
Properties properties;
};
}