|
template<typename QueryType > |
bool | registerQuery () |
| Register a Query type using the default priority functor. More...
|
|
template<typename QueryType > |
bool | registerQuery (std::function< int(const std::size_t &)> priority) |
| Register a Query type using a provided priority functor. More...
|
|
bool | registerQuery (Metadata &&metadata) |
| Register a Query type using the Query type's Metadata.
|
|
template<typename Tuple > |
bool | registerQueries () |
| Register a tuple of Query types using the default priority functor. More...
|
|
template<typename QueryType > |
bool | unregisterQuery () |
| Unregister a Query type.
|
|
bool | unregisterQuery (std::size_t typeIndex) |
| Unregister a Query type using its type index.
|
|
template<typename Tuple > |
bool | unregisterQueries () |
| Unregister a tuple of Query types.
|
|
template<typename QueryType > |
bool | contains () const |
| Determine whether or not a Query type (or a suitable replacement for it) is available.
|
|
bool | contains (std::size_t typeIndex) const |
| Determine whether or not a Query type (or a suitable replacement for it) is available using its type index.
|
|
template<typename QueryType > |
std::enable_if<!std::is_abstract< QueryType >::value, std::unique_ptr< QueryType > >::type | create () |
| Create an instance of a concrete Query type (or a suitable replacement for it), registering the Query type if it is not already registered.
|
|
template<typename QueryType > |
std::enable_if< std::is_abstract< QueryType >::value, std::unique_ptr< QueryType > >::type | create () |
| Create a a suitable replacement for an abstract Query type.
|
|
std::unique_ptr< Query > | create (const std::size_t &typeIndex) const |
| Create an instance of a Query type (or a suitable replacement for it).
|
|
template<typename QueryType > |
std::size_t | indexFor () const |
|
template<typename QueryType > |
std::enable_if<!std::is_abstract< QueryType >::value, std::size_t >::type | indexFor () |
| Given a concrete input Query type, return the type index of a registered Query type to perform the query, adding it if necessary.
|
|
template<typename QueryType > |
std::enable_if< std::is_abstract< QueryType >::value, std::size_t >::type | indexFor () |
| Given an abstract input Query type, return the type index of a registered Query type to perform the query.
|
|
std::size_t | indexFor (const std::size_t &typeIndex) const |
| Given an input Query type (which may be abstract), return the type index of a registered Query type to perform the query.
|
|
A factory for registering and creating Query instances.
Query types are selected according to a priority functor that is registered along with the Query type. The default priority functor favors Query types that are most derived from the input Query type.