15#include <RobotAPI/libraries/armem_objects/aron/Attachment.aron.generated.h>
16#include <RobotAPI/libraries/armem_objects/aron/FamiliarObjectInstance.aron.generated.h>
26 const std::string prefix = propertyPrefix;
28 def->optional(p.memoryName, prefix +
"MemoryName");
49 inline std::optional<arondto::FamiliarObjectInstance>
52 arondto::FamiliarObjectInstance aronBo;
66 std::optional<std::map<std::string, arondto::FamiliarObjectInstance>>
68 const std::optional<std::string>& providerName)
const
79 if (providerName.has_value())
81 providerSegments = &cs.providerSegments().
withName(providerName.value());
85 providerSegments = &cs.providerSegments().
all();
103 std::map<std::string, arondto::FamiliarObjectInstance> result;
108 auto& thisResult = result[ps.
name()];
111 <<
"Query returned more than one entity";
116 if (
auto converted =
convert(e))
118 thisResult = converted.value();
126 std::map<std::string, std::vector<arondto::FamiliarObjectInstance>>
128 const std::optional<std::string>& providerName)
const
138 if (providerName.has_value())
140 providerSegments = &cs.providerSegments().
withName(providerName.value());
144 providerSegments = &cs.providerSegments().
all();
160 std::map<std::string, std::vector<arondto::FamiliarObjectInstance>> result;
165 auto& thisResult = result[ps.
name()];
170 if (
auto converted =
convert(e))
172 thisResult.push_back(converted.value());
180 std::map<std::string, std::vector<arondto::FamiliarObjectInstance>>
183 const std::optional<std::string>& providerName)
const
193 if (providerName.has_value())
195 providerSegments = &cs.providerSegments().
withName(providerName.value());
199 providerSegments = &cs.providerSegments().
all();
218 std::map<std::string, std::vector<arondto::FamiliarObjectInstance>> result;
223 auto& thisResult = result[ps.
name()];
228 if (
auto converted =
convert(e))
230 thisResult.push_back(converted.value());
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
ObjectID getClassID() const
Return just the class ID without an intance name.
std::string str() const
Return "dataset/className" or "dataset/className/instanceName".
std::vector< std::string > getEntityNames() const
The memory name system (MNS) client.
Reader useReader(const MemoryID &memoryID)
Use a memory server and get a reader for it.
The query::Builder class provides a fluent-style specification of hierarchical queries.
QueryInput buildQueryInput() const
CoreSegmentSelector & coreSegments()
Start specifying core segments.
CoreSegmentSelector & withName(const std::string &name) override
EntitySelector & all() override
EntitySelector & withName(const std::string &name) override
SnapshotSelector & snapshots()
Start specifying entity snapshots.
ProviderSegmentSelector & withName(const std::string &name) override
EntitySelector & entities()
Start specifying entities.
ProviderSegmentSelector & all() override
SnapshotSelector & latest()
virtual DerivedT & withNamesStartingWith(const std::string &prefix)
Indicates that a query to the Memory Name System failed.
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
std::map< std::string, std::vector< arondto::FamiliarObjectInstance > > queryLatestFamiliarObjectInstancesFromClass(const ObjectID &classId, const std::optional< std::string > &providerName=std::nullopt) const
std::optional< std::map< std::string, arondto::FamiliarObjectInstance > > queryLatestFamiliarObjectInstance(const ObjectID &instanceId, const std::optional< std::string > &providerName=std::nullopt) const
std::map< std::string, std::vector< arondto::FamiliarObjectInstance > > queryAllLatestFamiliarObjectInstances(const std::optional< std::string > &providerName=std::nullopt) const
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
std::optional< arondto::FamiliarObjectInstance > convert(const wm::EntityInstance &instance)
const std::string CoreFamiliarObjectInstanceSegmentName
const std::string MemoryName
armem::wm::EntityInstance EntityInstance
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
bool forEachInstance(InstanceFunctionT &&func)
bool forEachProviderSegment(FunctionT &&func)
wm::Memory memory
The slice of the memory that matched the query.