Builder.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <RobotAPI/interface/armem/query.h>
5 
6 #include "selectors.h"
7 
8 
10 {
11  // ToDo: Make a memory selector (but this level is not in ice, yet)
12  /**
13  * @brief The query::Builder class provides a fluent-style specification of
14  * hierarchical queries.
15  *
16  * Syntax:
17  *
18  * @code
19  * TODO
20  * @endcode
21  */
22  class Builder :
23  public detail::ParentSelectorOps<Builder, CoreSegmentSelector>
24  {
25  public:
26 
28 
29  /// Start specifying core segments.
32 
33  template <class ...Ts>
35  {
36  return _addChild(args...);
37  }
38 
39 
40  // Short hands for common queries
41 
42  /// Get all snapshots from all entities in all segments.
43  void all();
44  /// Get all latest snapshots from entities in all segments.
45  void allLatest();
46 
47  /// Get all snapshots from all entities in all provider segments in a core segment.
49  /// Get latest snapshots from all entities in all provider segments in a core segment.
51 
52  /// Get all snapshots from all entities in a provider segment.
53  void allInProviderSegment(const MemoryID& providerSegmentID);
54  /// Get latest snapshots from all entities in a provider segment.
55  void allLatestInProviderSegment(const MemoryID& providerSegmentID);
56 
57  void allEntitySnapshots(const MemoryID& entityID);
58  void latestEntitySnapshot(const MemoryID& entityID);
59 
60  void singleEntitySnapshot(const MemoryID& snapshotID);
61  void multipleEntitySnapshots(const std::vector<MemoryID>& snapshotIDs);
62 
63 
65  armem::query::data::Input buildQueryInputIce() const;
66 
67  armem::query::data::MemoryQuerySeq buildMemoryQueries() const;
68 
69 
70  public:
73 
74  };
75 
76 }
armarx::armem::client::query::Builder::allLatestInCoreSegment
void allLatestInCoreSegment(const MemoryID &coreSegmentID)
Get latest snapshots from all entities in all provider segments in a core segment.
Definition: Builder.cpp:75
armarx::navigation::graph::coreSegmentID
const armem::MemoryID coreSegmentID
Definition: constants.h:30
armarx::armem::client::query::Builder::allInCoreSegment
void allInCoreSegment(const MemoryID &coreSegmentID)
Get all snapshots from all entities in all provider segments in a core segment.
Definition: Builder.cpp:67
armarx::armem::client::query::Builder::allLatest
void allLatest()
Get all latest snapshots from entities in all segments.
Definition: Builder.cpp:58
armarx::armem::client::query::Builder::singleEntitySnapshot
void singleEntitySnapshot(const MemoryID &snapshotID)
Definition: Builder.cpp:115
armarx::armem::client::query::Builder::allEntitySnapshots
void allEntitySnapshots(const MemoryID &entityID)
Definition: Builder.cpp:99
armarx::armem::client::query::Builder::buildQueryInput
QueryInput buildQueryInput() const
Definition: Builder.cpp:11
armarx::armem::query::DataMode::WithData
@ WithData
Get structure and ARON data.
armarx::armem::client::query::Builder::coreSegments
CoreSegmentSelector & coreSegments(Ts... args)
Definition: Builder.h:34
boost::target
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:688
armarx::armem::client::query::Builder::multipleEntitySnapshots
void multipleEntitySnapshots(const std::vector< MemoryID > &snapshotIDs)
Definition: Builder.cpp:123
Query.h
armarx::armem::client::query::Builder::latestEntitySnapshot
void latestEntitySnapshot(const MemoryID &entityID)
Definition: Builder.cpp:107
armarx::armem::query::QueryTarget::WM
@ WM
armarx::armem::client::query::Builder::dataMode
armem::query::DataMode dataMode
Definition: Builder.h:71
armarx::armem::client::query::Builder::buildQueryInputIce
armem::query::data::Input buildQueryInputIce() const
Definition: Builder.cpp:18
armarx::armem::client::query
Definition: forward_declarations.h:7
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::armem::query::DataMode
DataMode
Definition: DataMode.h:7
armarx::armem::client::query::Builder::coreSegments
CoreSegmentSelector & coreSegments()
Start specifying core segments.
Definition: Builder.cpp:38
selectors.h
armarx::armem::client::QueryInput
A query for parts of a memory.
Definition: Query.h:23
armarx::armem::client::query::Builder::allLatestInProviderSegment
void allLatestInProviderSegment(const MemoryID &providerSegmentID)
Get latest snapshots from all entities in a provider segment.
Definition: Builder.cpp:91
armarx::armem::client::query::detail::ParentSelectorOps
Definition: SelectorOps.h:79
armarx::armem::client::query::Builder::queryTarget
armem::query::QueryTarget queryTarget
Definition: Builder.h:72
armarx::armem::client::query::CoreSegmentSelector
Definition: selectors.h:117
armarx::armem::client::query::Builder
The query::Builder class provides a fluent-style specification of hierarchical queries.
Definition: Builder.h:22
armarx::armem::client::query::Builder::allInProviderSegment
void allInProviderSegment(const MemoryID &providerSegmentID)
Get all snapshots from all entities in a provider segment.
Definition: Builder.cpp:83
armarx::armem::client::query::Builder::all
void all()
Get all snapshots from all entities in all segments.
Definition: Builder.cpp:49
armarx::armem::client::query::detail::ParentSelectorOps< Builder, CoreSegmentSelector >::_addChild
ChildT & _addChild()
Definition: SelectorOps.h:91
armarx::armem::query::QueryTarget
QueryTarget
Definition: QueryTarget.h:8
armarx::armem::client::query::Builder::buildMemoryQueries
armem::query::data::MemoryQuerySeq buildMemoryQueries() const
Definition: Builder.cpp:23
armarx::armem::client::query::Builder::Builder
Builder(armem::query::DataMode dataMode=armem::query::DataMode::WithData, armem::query::QueryTarget target=armem::query::QueryTarget::WM)
Definition: Builder.cpp:7