Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/mobject/output-mapping.hpp"
OutputMapping is a facility to resolve output designations.
The session/model uses preliminary or partial output specifications, which are to be resolved to an actual system output while building and preparing a render network for operation (playback/rendering). For a given specification, resolution to the desired target spec may be derived by querying the OutputMapping. Here, the kind of the target specification is defined through the type parameter.
This is an generic map-like container, acting as Interface to be used in the signature of API functions either providing or requiring a Mapping. For each distinct usage situation, an instantiation of this template should be created, providing a definition context as template parameter. Instances of this concrete mapping type may then be default constructed and copied freely. The definition context is supposed to provide
DEF::output
usable as function pipe-ID –> TargetDEF::buildQuery (sourcePipeID,seqNr)
yielding a (defaults) query to be issued in case of accessing a non existent mapping DEF | static (compile-time) definition/configuration context |
Definition at line 121 of file output-mapping.hpp.
Public Types | |
using | Target = typename Setup::Target |
Public Member Functions | |
void | clear () |
bool | contains (PId mapping4sourcePipeID) |
bool | contains (PPipe sourcePipe) |
bool | empty () const |
Resolver | operator[] (PId sourcePipeID) |
standard map-style access to an OutputMapping. More... | |
Resolver | operator[] (PPipe const &pipe) |
similar to the standard map-style access, but accepts a source pipe object instead of just a pipe-ID | |
Resolver | operator[] (Query< asset::Pipe > query4pipe) |
determine an OutputMapping by resolving a complex query, instead of just picking a mapped pipe (which is the default usage). More... | |
size_t | size () const |
Classes | |
class | Resolver |
Private Types | |
using | PId = asset::ID< asset::Pipe > |
using | PPipe = asset::PPipe |
typedef _def< DEF > | Setup |
Private Member Functions | |
Resolver | buildResolutionWrapper (HashVal tableSlot) |
Target | resolveTarget (PId mappedPipeID) |
Private Attributes | |
std::map< HashVal, HashVal > | table_ |
|
inline |
standard map-style access to an OutputMapping.
For the given source pipe-ID the mapped target pipe-ID is fetched and then handed over to the configured DEF::output
functor, which is assumed to calculate or retrieve the actual result object.
DEF::buildQuery
function and thus can be configured for the concrete usage situation of the mapping. Definition at line 320 of file output-mapping.hpp.
|
inline |
determine an OutputMapping by resolving a complex query, instead of just picking a mapped pipe (which is the default usage).
Accessing the OutputMapping this way by query enables all kinds of extended usages: It suffices that the given query somehow yields a Pipe, which then is considered the mapped result and handed over to the DEF::output
functor for resolution to a result object to be returned.
Query | for a pipe, which is handed over as-is to the rules engine. |
Definition at line 375 of file output-mapping.hpp.
References Struct::retrieve.