SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | List of all members
smtk::resource::query::Queries Class Reference

A class for registering and accessing Query types. More...

#include <Queries.h>

Public Member Functions

 Queries (const Queries &)=delete
 
 Queries (Queries &&rhs) noexcept
 
Queriesoperator= (const Queries &)=delete
 
Queriesoperator= (Queries &&rhs) noexcept
 
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...
 
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.
 
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.
 
template<typename QueryType >
QueryType & get () const
 Access a Query type, constructing one if necessary.
 
template<typename CacheType >
CacheType & cache () const
 Access a Query Cache.
 
decltype(std::declval< Container< Cache >>().data()) caches ()
 
decltype(std::declval< Container< Query >>().data()) data ()
 
Factoryfactory ()
 

Detailed Description

A class for registering and accessing Query types.

This class is a Factory with additional storage for cached Query types and for Query Caches.

Member Function Documentation

◆ registerQueries()

template<typename Tuple >
bool smtk::resource::query::Queries::registerQueries ( )
inline

Register a tuple of Query types using the default priority functor.

Queries must be default constructibel.

◆ registerQuery() [1/2]

template<typename QueryType >
bool smtk::resource::query::Queries::registerQuery ( )
inline

Register a Query type using the default priority functor.

Queries must be default constructible.

◆ registerQuery() [2/2]

template<typename QueryType >
bool smtk::resource::query::Queries::registerQuery ( std::function< int(const std::size_t &)> &&  priority)
inline

Register a Query type using a provided priority functor.

Queries must be default constructible.


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