Extractor.h
Go to the documentation of this file.
1 #pragma once
2 
3 // STD/STL
4 #include <memory>
5 
6 // Simox
7 #include <SimoxUtility/json.h>
8 
9 // ArmarX
12 
14 {
15  class Extractor
16  {
17  public:
19  {
21  std::map<std::string, aron::data::VariantPtr> extraction;
22  };
23 
24  Extractor(const aron::type::Descriptor t, const std::string& id) :
25  extractsType(t), identifier(id){};
26  virtual ~Extractor() = default;
27 
28  virtual ExtractionResult extract(aron::data::DictPtr& data) = 0;
29  virtual aron::data::DictPtr merge(ExtractionResult& encoding) = 0;
30 
31  virtual void configure(const nlohmann::json& json);
32 
34  const std::string identifier;
35  };
36 } // namespace armarx::armem::server::ltm::processor
armarx::armem::server::ltm::processor
Definition: Converter.cpp:3
armarx::armem::server::ltm::processor::Extractor::ExtractionResult::dataWithoutExtraction
aron::data::DictPtr dataWithoutExtraction
Definition: Extractor.h:20
armarx::armem::server::ltm::processor::Extractor::extract
virtual ExtractionResult extract(aron::data::DictPtr &data)=0
Dict.h
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::armem::server::ltm::processor::Extractor
Definition: Extractor.h:15
armarx::armem::server::ltm::processor::Extractor::extractsType
const aron::type::Descriptor extractsType
Definition: Extractor.h:33
armarx::armem::server::ltm::processor::Extractor::ExtractionResult
Definition: Extractor.h:18
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition: Dict.h:41
armarx::armem::server::ltm::processor::Extractor::ExtractionResult::extraction
std::map< std::string, aron::data::VariantPtr > extraction
Definition: Extractor.h:21
armarx::armem::server::ltm::processor::Extractor::configure
virtual void configure(const nlohmann::json &json)
Definition: Extractor.cpp:6
armarx::aron::type::Descriptor
Descriptor
Definition: Descriptor.h:76
armarx::armem::server::ltm::processor::Extractor::Extractor
Extractor(const aron::type::Descriptor t, const std::string &id)
Definition: Extractor.h:24
armarx::armem::server::ltm::processor::Extractor::merge
virtual aron::data::DictPtr merge(ExtractionResult &encoding)=0
armarx::armem::server::ltm::processor::Extractor::identifier
const std::string identifier
Definition: Extractor.h:34
NDArray.h
armarx::armem::server::ltm::processor::Extractor::~Extractor
virtual ~Extractor()=default