EntityQueryProcessorBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../base/EntityQueryProcessorBase.h"
4 
6 
8 {
9 
10  template <class _EntityT, class _ResultEntityT>
12  public base::EntityQueryProcessorBase<_EntityT, _ResultEntityT>
13  {
14  protected:
15 
17 
18 
19  public:
20 
21  using EntityT = typename Base::EntityT;
25 
26 
27  public:
28  virtual ~EntityQueryProcessorBase() = default;
29 
30  using Base::process;
31 
32 
33  protected:
34  void addResultSnapshot(ResultEntityT& result, const EntitySnapshotT& snapshot) const override
35  {
36  snapshot.forEachInstance([](const typename EntitySnapshotT::EntityInstanceT& instance)
37  {
38  instance.metadata().access();
39  });
40  EntitySnapshotT copy = snapshot;
41  result.addSnapshot(std::move(copy));
42  }
43  };
44 }
armarx::armem::server::query_proc::base::EntityQueryProcessorBase::ResultEntityT
_ResultEntityT ResultEntityT
Definition: EntityQueryProcessorBase.h:38
armarx::armem::server::query_proc::wm::detail::EntityQueryProcessorBase::~EntityQueryProcessorBase
virtual ~EntityQueryProcessorBase()=default
armarx::armem::server::query_proc::base::BaseQueryProcessorBase< SourceEntityT, armem::wm::Entity, armem::query::data::EntityQuery >
armarx::armem::server::query_proc::base::EntityQueryProcessorBase< SourceEntityT, armem::wm::Entity >::ResultSnapshotT
typename ResultEntityT::EntitySnapshotT ResultSnapshotT
Definition: EntityQueryProcessorBase.h:39
armarx::armem::server::query_proc::base::EntityQueryProcessorBase
Definition: EntityQueryProcessorBase.h:26
armarx::armem::server::query_proc::base::EntityQueryProcessorBase::process
virtual void process(ResultEntityT &result, const armem::query::data::EntityQuery &query, const EntityT &entity) const override
Process the query and populate result.
Definition: EntityQueryProcessorBase.h:45
armarx::armem::base::EntityBase::addSnapshot
EntitySnapshotT & addSnapshot(const Time &timestamp)
Add a snapshot at the given time.
Definition: EntityBase.h:629
armarx::armem::server::query_proc::wm::detail::EntityQueryProcessorBase::addResultSnapshot
void addResultSnapshot(ResultEntityT &result, const EntitySnapshotT &snapshot) const override
Definition: EntityQueryProcessorBase.h:34
copy
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE The MIT Marcin Kalicinski Permission is hereby free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to copy
Definition: license.txt:39
armarx::armem::server::query_proc::base::EntityQueryProcessorBase< SourceEntityT, armem::wm::Entity >::EntitySnapshotT
typename EntityT::EntitySnapshotT EntitySnapshotT
Definition: EntityQueryProcessorBase.h:36
armarx::armem::server::query_proc::wm::detail::EntityQueryProcessorBase
Definition: EntityQueryProcessorBase.h:11
armarx::armem::wm::Entity
Client-side working memory entity.
Definition: memory_definitions.h:93
Logging.h
armarx::armem::server::query_proc::base::EntityQueryProcessorBase< SourceEntityT, armem::wm::Entity >::EntityT
SourceEntityT EntityT
Definition: EntityQueryProcessorBase.h:35
armarx::armem::server::query_proc::wm::detail
Definition: CoreSegmentQueryProcessorBase.cpp:3