SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Static Public Member Functions | Protected Types | Static Protected Member Functions | Friends | List of all members
smtk::resource::query::DerivedFrom< SelfType, ParentType > Class Template Reference

Query functors can be registered to Resources as the implementation of a base (and often abstract) Query. More...

#include <DerivedFrom.h>

Inheritance diagram for smtk::resource::query::DerivedFrom< SelfType, ParentType >:
[legend]
Collaboration diagram for smtk::resource::query::DerivedFrom< SelfType, ParentType >:
[legend]

Static Public Member Functions

static std::size_t typeIndex ()
 

Protected Types

typedef ParentType Parent
 

Static Protected Member Functions

static int numberOfGenerationsFromType (const std::size_t index)
 Return the number of generations from this instance to the type index of a parent, or return a large negative number if the two types are unrelated.
 

Friends

class Metadata
 

Detailed Description

template<typename SelfType, typename ParentType>
class smtk::resource::query::DerivedFrom< SelfType, ParentType >

Query functors can be registered to Resources as the implementation of a base (and often abstract) Query.

The default priority functor for a Query type is related to its hierarchical relationship to the base Query type (the most derived registered class is returned); a different priority functor can be assigned at registration time. CRTP is used to ensure that Query classes all have an associated type_index and to facilitate type walking for the default priority algorithm.


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