![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "steam/mobject/session/query/fake-configrules.hpp"
the actual table holding preconfigured answers packaged as boost::any objects.
MockTable is the implementation base; subclasses for the individual types are layered below to define the resolve(..) functions. Finally #MockConfigRules wraps things up.
The implementation relies on boost::any records to stash the objects in automatically managed heap memory.
Definition at line 121 of file fake-configrules.hpp.
Public Member Functions | |
| template<> | |
| bool | detect_case (WrapReturn< Pipe >::Wrapper &candidate, Query< Pipe > const &q) |
| template<> | |
| bool | detect_case (WrapReturn< const ProcPatt >::Wrapper &candidate, Query< const ProcPatt > const &q) |
| template<> | |
| bool | detect_case (WrapReturn< asset::Timeline >::Wrapper &candidate, Query< asset::Timeline > const &q) |
| template<> | |
| bool | detect_case (WrapReturn< asset::Sequence >::Wrapper &candidate, Query< asset::Sequence > const &q) |
Protected Member Functions | |
| MockTable () | |
| virtual void | reset () |
| clear the contents of the mock solution table. | |
| any const & | fetch_from_table_for (QueryKey const &query) |
| this is the (preliminary/mock) implementation handling queries for objects of a specific type and with capabilities or properties defined by the query. | |
| template<class TY > | |
| bool | detect_case (typename WrapReturn< TY >::Wrapper &, Query< TY > const &) |
| Hook for treating very special cases for individual types only. | |
| bool | fabricate_matching_new_Pipe (Query< Pipe > const &q, string const &pipeID, string const &streamID) |
| special case: create a new pipe with matching pipe and stream IDs on the fly when referred... | |
| bool | fabricate_just_new_Pipe (Query< Pipe > const &q) |
| special case: create a new pipe for a specific stream ID | |
| bool | fabricate_ProcPatt_on_demand (Query< const ProcPatt > const &q) |
| special case: create/retrieve new processing pattern for given stream ID... | |
| bool | fabricate_Timeline_on_demand (Query< asset::Timeline > const &q) |
| special case: fabricate new Timeline, maybe using specific sub-objects as hinted by the IDs given within the query. | |
| bool | fabricate_Sequence_on_demand (Query< asset::Sequence > const &q) |
| special case: fabricate new Timeline, maybe using ID specs from the query... | |
| template<class TY > | |
| bool | set_new_mock_solution (Query< TY > const &q, typename WrapReturn< TY >::Wrapper &candidate) |
| for entering "valid" solutions on-the-fly from tests | |
Protected Member Functions inherited from ConfigRules< InterfaceTypes > | |
| ConfigRules () | |
| virtual | ~ConfigRules () |
Private Types | |
| using | Tab = std::map< QueryKey, any > |
Private Member Functions | |
| void | fill_mock_table () |
| hard coded answers to configuration queries. | |
| template<class STRU > | |
| any & | item (string const &querySpec) |
| shortcut for simply accessing a table entry | |
Private Attributes | |
| Tab | answer_ |
| bool | isInit_ |
Additional Inherited Members | |
Static Public Attributes inherited from ConfigResolver | |
| static lib::Depend< ConfigResolver > | instance |
| Singleton factory instance, configured with the actual implementation type. | |
|
protected |
Definition at line 268 of file fake-configrules.cpp.
Definition at line 124 of file fake-configrules.hpp.
|
protectedvirtual |
clear the contents of the mock solution table.
Used by Session lifecycle to restore pristine state
Implements ConfigRules< InterfaceTypes >.
Definition at line 121 of file fake-configrules.cpp.
References MockTable::answer_, and MockTable::isInit_.
|
protected |
this is the (preliminary/mock) implementation handling queries for objects of a specific type and with capabilities or properties defined by the query.
The real implementation would require a rule based system (Ichthyo plans to use YAP Prolog), while this dummy implementation simply replies based on a table of pre-fabricated objects. Never fails.
Definition at line 287 of file fake-configrules.cpp.
References MockTable::answer_, MockTable::fill_mock_table(), and MockTable::isInit_.
Here is the call graph for this function:
|
inlineprotected |
Hook for treating very special cases for individual types only.
Definition at line 218 of file fake-configrules.hpp.
|
protected |
special case: create a new pipe with matching pipe and stream IDs on the fly when referred...
Definition at line 138 of file fake-configrules.cpp.
References MockTable::answer_, and Struct::retrieve.
Referenced by MockTable::detect_case().
Here is the caller graph for this function:special case: create a new pipe for a specific stream ID
Definition at line 149 of file fake-configrules.cpp.
References MockTable::answer_, and Struct::retrieve.
Referenced by MockTable::detect_case().
Here is the caller graph for this function:special case: create/retrieve new processing pattern for given stream ID...
Definition at line 160 of file fake-configrules.cpp.
References MockTable::answer_, and Struct::retrieve.
Referenced by MockTable::detect_case().
Here is the caller graph for this function:
|
protected |
special case: fabricate new Timeline, maybe using specific sub-objects as hinted by the IDs given within the query.
This might include searching the session's timelines / sequences to retrieve an existing object with matching ID...
Definition at line 175 of file fake-configrules.cpp.
References MockTable::answer_, Session::current, Query< RES >::extractID(), StructFactory::made4fake(), Query< RES >::Builder::prependConditions(), Query< RES >::rebuild(), Query< RES >::Builder::removeTerm(), Struct::retrieve, and Session::timelines.
Referenced by MockTable::detect_case().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
special case: fabricate new Timeline, maybe using ID specs from the query...
Definition at line 211 of file fake-configrules.cpp.
References MockTable::answer_, Session::current, Query< RES >::extractID(), StructFactory::made4fake(), Query< RES >::Builder::prependConditions(), Query< RES >::rebuild(), Query< RES >::Builder::removeTerm(), Struct::retrieve, and Session::sequences.
Referenced by MockTable::detect_case().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
for entering "valid" solutions on-the-fly from tests
Definition at line 249 of file fake-configrules.cpp.
References MockTable::answer_.
Referenced by MockTable::detect_case().
Here is the caller graph for this function:
|
private |
hard coded answers to configuration queries.
Definition at line 97 of file fake-configrules.cpp.
References MockTable::answer_, and MockTable::isInit_.
Referenced by MockTable::fetch_from_table_for().
Here is the caller graph for this function:
|
inlineprivate |
shortcut for simply accessing a table entry
Definition at line 153 of file fake-configrules.hpp.
References MockTable::answer_.
|
inline |
Definition at line 224 of file fake-configrules.hpp.
References Query< RES >::extractID(), MockTable::fabricate_just_new_Pipe(), MockTable::fabricate_matching_new_Pipe(), MockTable::set_new_mock_solution(), and Query< RES >::usesPredicate().
Here is the call graph for this function:
|
inline |
Definition at line 247 of file fake-configrules.hpp.
References Query< RES >::extractID(), and MockTable::fabricate_ProcPatt_on_demand().
Here is the call graph for this function:
|
inline |
Definition at line 258 of file fake-configrules.hpp.
References MockTable::fabricate_Timeline_on_demand().
Here is the call graph for this function:
|
inline |
Definition at line 267 of file fake-configrules.hpp.
References MockTable::fabricate_Sequence_on_demand().
Here is the call graph for this function:
|
private |
Definition at line 126 of file fake-configrules.hpp.
Referenced by MockTable::fabricate_just_new_Pipe(), MockTable::fabricate_matching_new_Pipe(), MockTable::fabricate_ProcPatt_on_demand(), MockTable::fabricate_Sequence_on_demand(), MockTable::fabricate_Timeline_on_demand(), MockTable::fetch_from_table_for(), MockTable::fill_mock_table(), MockTable::item(), MockTable::reset(), and MockTable::set_new_mock_solution().
|
private |
Definition at line 127 of file fake-configrules.hpp.
Referenced by MockTable::fetch_from_table_for(), MockTable::fill_mock_table(), and MockTable::reset().
Inheritance diagram for MockTable:
Collaboration diagram for MockTable: