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
9{
10 // ToDo: Make a memory selector (but this level is not in ice, yet)
11 /**
12 * @brief The query::Builder class provides a fluent-style specification of
13 * hierarchical queries.
14 *
15 * Syntax:
16 *
17 * @code
18 * TODO
19 * @endcode
20 */
21 class Builder : public detail::ParentSelectorOps<Builder, CoreSegmentSelector>
22 {
23 public:
26
27 /// Start specifying core segments.
30
31 template <class... Ts>
33 coreSegments(Ts... args)
34 {
35 return _addChild(args...);
36 }
37
38 // Short hands for common queries
39
40 /// Get all snapshots from all entities in all segments.
41 void all();
42 /// Get all latest snapshots from entities in all segments.
43 void allLatest();
44
45 /// Get all snapshots from all entities in all provider segments in a core segment.
46 void allInCoreSegment(const MemoryID& coreSegmentID);
47 /// Get latest snapshots from all entities in all provider segments in a core segment.
48 void allLatestInCoreSegment(const MemoryID& coreSegmentID);
49
50 /// Get all snapshots from all entities in a provider segment.
51 void allInProviderSegment(const MemoryID& providerSegmentID);
52 /// Get latest snapshots from all entities in a provider segment.
53 void allLatestInProviderSegment(const MemoryID& providerSegmentID);
54
55 void allEntitySnapshots(const MemoryID& entityID);
56 void latestEntitySnapshot(const MemoryID& entityID);
57
58 void singleEntitySnapshot(const MemoryID& snapshotID);
59 void multipleEntitySnapshots(const std::vector<MemoryID>& snapshotIDs);
60
61
63 armem::query::data::Input buildQueryInputIce() const;
64
65 armem::query::data::MemoryQuerySeq buildMemoryQueries() const;
66
67
68 public:
71 };
72
73} // namespace armarx::armem::client::query
CoreSegmentSelector & coreSegments(Ts... args)
Definition Builder.h:33
void allInCoreSegment(const MemoryID &coreSegmentID)
Get all snapshots from all entities in all provider segments in a core segment.
Definition Builder.cpp:66
void allLatestInProviderSegment(const MemoryID &providerSegmentID)
Get latest snapshots from all entities in a provider segment.
Definition Builder.cpp:105
void multipleEntitySnapshots(const std::vector< MemoryID > &snapshotIDs)
Definition Builder.cpp:157
void singleEntitySnapshot(const MemoryID &snapshotID)
Definition Builder.cpp:144
void latestEntitySnapshot(const MemoryID &entityID)
Definition Builder.cpp:131
armem::query::data::MemoryQuerySeq buildMemoryQueries() const
Definition Builder.cpp:27
void all()
Get all snapshots from all entities in all segments.
Definition Builder.cpp:54
armem::query::DataMode dataMode
Definition Builder.h:69
Builder(armem::query::DataMode dataMode=armem::query::DataMode::WithData, armem::query::QueryTarget target=armem::query::QueryTarget::WM)
Definition Builder.cpp:6
armem::query::data::Input buildQueryInputIce() const
Definition Builder.cpp:21
void allInProviderSegment(const MemoryID &providerSegmentID)
Get all snapshots from all entities in a provider segment.
Definition Builder.cpp:92
armem::query::QueryTarget queryTarget
Definition Builder.h:70
void allLatest()
Get all latest snapshots from entities in all segments.
Definition Builder.cpp:60
void allLatestInCoreSegment(const MemoryID &coreSegmentID)
Get latest snapshots from all entities in all provider segments in a core segment.
Definition Builder.cpp:79
void allEntitySnapshots(const MemoryID &entityID)
Definition Builder.cpp:118
CoreSegmentSelector & coreSegments()
Start specifying core segments.
Definition Builder.cpp:42
@ WithData
Get structure and ARON data.
Definition DataMode.h:9
A query for parts of a memory.
Definition Query.h:24