68 using AnyPair = std::pair<const QueryKey, any>;
74 return AnyPair(query, any(obj));
81 using Ptr = WrapReturn<STRU>::Wrapper;
83 string capabilities (caps);
99 INFO (config,
"creating mock answers for some hard wired config queries...");
106 answer_.insert (entry_Struct<cPP> (
"stream(video)"));
107 answer_.insert (entry_Struct<cPP> (
"stream(teststream)"));
108 item<cPP> (
"stream(default)") = item<cPP> (
"stream(video)");
110 answer_.insert (entry_Struct<Pipe> (
"pipe(master), stream(video)"));
111 item<Pipe> (
"") = item<Pipe>(
"pipe(master), stream(video)");
113 answer_.insert (entry_Struct<Pipe> (
"pipe(ambiance)"));
125 INFO (config,
"discarded all config query mock answers.");
140 using Ptr = WrapReturn<Pipe>::Wrapper;
143 answer_.insert (entry<Pipe> (q, newPipe));
151 using Ptr = WrapReturn<Pipe>::Wrapper;
154 answer_.insert (entry<Pipe> (q, newPipe));
163 typedef WrapReturn<cPP>::Wrapper Ptr;
166 answer_.insert (entry<cPP> (q, newPP));
178 using Ptr = WrapReturn<aTL>::Wrapper;
195 for ( ; i < cnt; ++i)
204 answer_.insert (entry<aTL> (normalisedQuery, newTimeline));
205 answer_.insert (entry<aTL> (query, newTimeline));
214 using Ptr = WrapReturn<aSeq>::Wrapper;
231 for ( ; i < cnt; ++i)
240 answer_.insert (entry<aSeq> (normalisedQuery, newSequence));
241 answer_.insert (entry<aSeq> (query, newSequence));
252 answer_.insert (entry<TY> (q, obj));
264 WARN (config,
"using a mock implementation of the ConfigQuery interface");
289 static const any NOTFOUND;
292 Tab::iterator i =
answer_.find (query);
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Wrapper for indexing and ordering.
Builder & prependConditions(string additionalQueryPredicates)
Builder & removeTerm(Symbol termPredicate)
remove the first term from this query definition, which matches the given predicate symbol
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
string extractID(Symbol predicate) const
convenience shortcut to extract a desired name-ID.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
"Processing Pattern" is a structural Asset representing information how to build some part of the ren...
lib::P< STRU > made4fake(Query< STRU > const &query)
special backdoor for fake-configrules.hpp This allows to simulate creation of objects triggered by ru...
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
static StructFactory retrieve
storage for the static StructFactory instance
TimelineAccess timelines
collection of timelines (top level)
SequenceAccess sequences
collection of sequences
static session::SessManager & current
access point to the current Session
MockConfigRules()
to be used only by the singleton factory
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 wit...
bool fabricate_ProcPatt_on_demand(Query< const ProcPatt > const &q)
special case: create/retrieve new processing pattern for given stream ID...
any const & fetch_from_table_for(QueryKey const &query)
this is the (preliminary/mock) implementation handling queries for objects of a specific type and wit...
void fill_mock_table()
hard coded answers to configuration queries.
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_Sequence_on_demand(Query< asset::Sequence > const &q)
special case: fabricate new Timeline, maybe using ID specs from the query...
bool set_new_mock_solution(Query< TY > const &q, typename WrapReturn< TY >::Wrapper &candidate)
for entering "valid" solutions on-the-fly from tests
virtual void reset()
clear the contents of the mock solution table.
Mock/Test/Debugging Implementation of the config rules system.
Organisational grouping device within the Session model ("Track" / "Media Bin").
This header is for including and configuring NoBug.
string extractID(Symbol sym, const string &termString)
(preliminary) helper: instead of really parsing and evaluating the terms, just do a regular expressio...
string removeTerm(Symbol sym, string &queryString)
(preliminary) helper: cut a term with the given symbol.
AnyPair entry(Query< TY > const &query, typename WrapReturn< TY >::Wrapper &obj)
helper to simplify creating mock table entries, wrapped correctly
AnyPair entry_Struct(Literal caps)
helper especially for creating structural assets from a capability query
std::pair< const QueryKey, any > AnyPair
Namespace of Session and user visible high-level objects.
Steam-Layer implementation namespace root.
bool isnil(lib::time::Duration const &dur)
A "processing pipe" represented as Asset.
Definition of a structural asset to express patterns of wiring or processing Processing patterns can ...
Utilities to support working with predicate queries.
Basic and generic representation of an internal query.
Primary Interface to the current Session.
Marker types to indicate a literal string and a Symbol.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...