SpecializedProviderSegment.h
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
10 
11 #include <string>
12 
13 #include "SpecializedCoreSegment.h"
14 
16 {
17  /**
18  * @brief A base class for provider segments
19  */
20  class SpecializedProviderSegment : public detail::SegmentBase<server::wm::ProviderSegment>
21  {
23 
24  public:
25 
28  const std::string& defaultProviderSegmentName = "",
29  const std::string& defaultCoreSegmentName = "",
30  aron::type::ObjectPtr providerSegmentAronType = nullptr,
31  aron::type::ObjectPtr coreSegmentAronType = nullptr,
32  int defaultMaxHistorySize = 10,
33  const std::vector<PredictionEngine>& providerSegmentPredictionEngines = {},
34  const std::vector<PredictionEngine>& coreSegmentPredictionEngines = {});
35 
36  virtual ~SpecializedProviderSegment() override;
37 
38  virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix = "") override;
39  virtual void init() override;
40 
41  void setDefaultProviderSegmentName(const std::string& providerSegmentName);
42  void setDefaultMaxHistorySize(int64_t maxHistorySize);
44  void
45  setPredictionEngines(const std::vector<PredictionEngine>& predictionEngines);
46 
49 
50 
51  public:
52 
54  std::vector<PredictionEngine> predictionEngines;
56 
57  struct Properties
58  {
59  std::string segmentName;
60  int64_t maxHistorySize;
61  };
63  };
64 }
armarx::armem::server::segment::SpecializedProviderSegment::Properties::maxHistorySize
int64_t maxHistorySize
Definition: SpecializedProviderSegment.h:60
armarx::armem::server::segment::SpecializedCoreSegment
A base class for core segments.
Definition: SpecializedCoreSegment.h:20
armarx::armem::server::segment::SpecializedProviderSegment::coreSegment
SpecializedCoreSegment coreSegment
Definition: SpecializedProviderSegment.h:55
armarx::armem::server::segment::SpecializedProviderSegment::properties
Properties properties
Definition: SpecializedProviderSegment.h:62
armarx::armem::server::MemoryToIceAdapter
Helps connecting a Memory server to the Ice interface.
Definition: MemoryToIceAdapter.h:19
armarx::armem::server::segment::SpecializedProviderSegment::Properties::segmentName
std::string segmentName
Definition: SpecializedProviderSegment.h:59
armarx::armem::server::segment::SpecializedProviderSegment
A base class for provider segments.
Definition: SpecializedProviderSegment.h:20
armarx::armem::server::segment::SpecializedProviderSegment::setPredictionEngines
void setPredictionEngines(const std::vector< PredictionEngine > &predictionEngines)
Definition: SpecializedProviderSegment.cpp:97
armarx::armem::server::segment::SpecializedProviderSegment::setDefaultMaxHistorySize
void setDefaultMaxHistorySize(int64_t maxHistorySize)
Definition: SpecializedProviderSegment.cpp:85
memory_definitions.h
armarx::armem::server::segment::SpecializedProviderSegment::~SpecializedProviderSegment
virtual ~SpecializedProviderSegment() override
Definition: SpecializedProviderSegment.cpp:35
armarx::armem::server::segment::SpecializedProviderSegment::setDefaultProviderSegmentName
void setDefaultProviderSegmentName(const std::string &providerSegmentName)
Definition: SpecializedProviderSegment.cpp:79
armarx::armem::server::segment::detail::SegmentBase
A base class for memory servers to manage their segments.
Definition: SpecializedSegment.h:24
armarx::armem::server::segment::SpecializedProviderSegment::getProviderSegment
wm::ProviderSegment & getProviderSegment()
Definition: SpecializedProviderSegment.cpp:103
armarx::armem::server::segment::SpecializedProviderSegment::aronType
aron::type::ObjectPtr aronType
Definition: SpecializedProviderSegment.h:53
armarx::armem::server::wm::ProviderSegment
Definition: memory_definitions.h:60
armarx::armem::server::segment::SpecializedProviderSegment::setAronType
void setAronType(aron::type::ObjectPtr aronType)
Definition: SpecializedProviderSegment.cpp:91
armarx::armem::server::segment::SpecializedProviderSegment::init
virtual void init() override
Definition: SpecializedProviderSegment.cpp:56
forward_declarations.h
armarx::armem::server::segment::SpecializedProviderSegment::Properties
Definition: SpecializedProviderSegment.h:57
armarx::armem::server::segment
Definition: constants.h:1
armarx::armem::server::segment::SpecializedProviderSegment::SpecializedProviderSegment
SpecializedProviderSegment(MemoryToIceAdapter &iceMemory, const std::string &defaultProviderSegmentName="", const std::string &defaultCoreSegmentName="", aron::type::ObjectPtr providerSegmentAronType=nullptr, aron::type::ObjectPtr coreSegmentAronType=nullptr, int defaultMaxHistorySize=10, const std::vector< PredictionEngine > &providerSegmentPredictionEngines={}, const std::vector< PredictionEngine > &coreSegmentPredictionEngines={})
Definition: SpecializedProviderSegment.cpp:12
armarx::armem::server::segment::detail::SegmentBase< server::wm::ProviderSegment >::iceMemory
MemoryToIceAdapter & iceMemory
Definition: SpecializedSegment.h:60
forward_declarations.h
IceUtil::Handle< class PropertyDefinitionContainer >
forward_declarations.h
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
Logging.h
armarx::armem::server::segment::SpecializedProviderSegment::predictionEngines
std::vector< PredictionEngine > predictionEngines
Definition: SpecializedProviderSegment.h:54
SpecializedCoreSegment.h
armarx::armem::server::segment::SpecializedProviderSegment::defineProperties
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
Definition: SpecializedProviderSegment.cpp:40