core::trust::Store::Query Class Referenceabstract

The Query class encapsulates queries against a trust store instance. More...

`#include <store.h>`

Collaboration diagram for core::trust::Store::Query:

## Classes

struct | Errors
| All Query-specific error/exception types go here. More...

## Public Types

enum | Status { Status::armed, Status::has_more_results, Status::eor, Status::error }
| The state of the query. More...

## Public Member Functions

| Query (const Query &)=delete
virtual | ~Query ()=default
virtual Status | status () const =0
| Access the status of the query. More...
virtual void | for_application_id (const std::string &id)=0
| Limit the query to a specific application Id. More...
virtual void | for_feature (Feature feature)=0
| Limit the query to a service-specific feature. More...
virtual void | for_interval (const Request::Timestamp &begin, const Request::Timestamp &end)=0
| Limit the query to the specified time interval. More...
virtual void | for_answer (Request::Answer answer)=0
| Limit the query for a specific answer. More...
virtual void | all ()=0
| Query all stored requests. More...
virtual void | execute ()=0
| Execute the query against the store. More...
virtual void | next ()=0
| After successful execution, advance to the next request. More...
virtual void | erase ()=0
| After successful execution, erase the current element and advance to the next request. More...
virtual Request | current ()=0
| Access the request the query currently points to. More...

## Protected Member Functions

| Query ()=default

## Detailed Description

The Query class encapsulates queries against a trust store instance.

Definition at line 86 of file store.h.

## Member Enumeration Documentation

enum core::trust::Store::Query::Status

strong

The state of the query.

Enumerator
armed | The query is armed but hasn't been run.
has_more_results | The query has been executed and has more results.
eor | All results have been visited.
error | An error occured.

Definition at line 117 of file store.h.

## Constructor & Destructor Documentation

core::trust::Store::Query::Query | ( | const Query & |  | ) |

delete

virtual core::trust::Store::Query::~Query | ( |  | ) |

virtual default

core::trust::Store::Query::Query | ( |  | ) |

protected default

## Member Function Documentation

virtual void core::trust::Store::Query::all | ( |  | ) |

pure virtual

Query all stored requests.

virtual Request core::trust::Store::Query::current | ( |  | ) |

pure virtual

Access the request the query currently points to.

virtual void core::trust::Store::Query::erase | ( |  | ) |

pure virtual

After successful execution, erase the current element and advance to the next request.

virtual void core::trust::Store::Query::execute | ( |  | ) |

pure virtual

Execute the query against the store.

virtual void core::trust::Store::Query::for_answer | ( | Request::Answer | answer | ) |

pure virtual

Limit the query for a specific answer.

virtual void core::trust::Store::Query::for_application_id | ( | const std::string & | id | ) |

pure virtual

Limit the query to a specific application Id.

virtual void core::trust::Store::Query::for_feature | ( | Feature | feature | ) |

pure virtual

Limit the query to a service-specific feature.

virtual void core::trust::Store::Query::for_interval | ( | const Request::Timestamp & | begin,
|  | const Request::Timestamp & | end
| ) |  |

pure virtual

Limit the query to the specified time interval.

virtual void core::trust::Store::Query::next | ( |  | ) |

pure virtual

After successful execution, advance to the next request.

virtual Status core::trust::Store::Query::status | ( |  | ) | const

pure virtual

Access the status of the query.

The documentation for this class was generated from the following file:

- /build/trust-store-uD3f_u/trust-store-2.0.0+16.04.20160119/include/core/trust/store.h