QueryResult Struct Reference

Result of a QueryInput. More...

#include <RobotAPI/libraries/armem/client/Query.h>

+ Inheritance diagram for QueryResult:

Public Member Functions

armem::query::data::Result toIce () const
 
- Public Member Functions inherited from SuccessHeader
 operator bool () const
 

Static Public Member Functions

static QueryResult fromIce (const armem::query::data::Result &ice)
 

Public Attributes

wm::Memory memory
 The slice of the memory that matched the query. More...
 
- Public Attributes inherited from SuccessHeader
std::string errorMessage
 
bool success
 

Friends

std::ostream & operator<< (std::ostream &os, const QueryResult &rhs)
 

Detailed Description

Result of a QueryInput.

If success is false, an error occurred during the query. In this case, errorMessage can contain more information.

Note
An empty result is valid, i.e. successful. In other words, an empty result is not a failure. To check whether any entity snapshot matched the query, use memory.hasSnapshots() or memory.hasInstances().
See also
wm::Memory::hasInstances(), wm::Memory::hasSnapshots()

Definition at line 50 of file Query.h.

Member Function Documentation

◆ fromIce()

QueryResult fromIce ( const armem::query::data::Result &  ice)
static

Definition at line 25 of file Query.cpp.

+ Here is the caller graph for this function:

◆ toIce()

armem::query::data::Result toIce ( ) const

Definition at line 30 of file Query.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const QueryResult rhs 
)
friend

Definition at line 35 of file Query.cpp.

Member Data Documentation

◆ memory

The slice of the memory that matched the query.

To check whether the memory contains any snapshots or instances, use memory.hasSnapshots() or memory.hasInstances().

Definition at line 58 of file Query.h.


The documentation for this struct was generated from the following files: