Lumiera  0.pre.03
»edit your freedom«
output-mapping.hpp File Reference

Go to the source code of this file.

Description

Translating and wiring output designations.

OutputMapping is a complement to the OutputDesignation handles used at various places in the high-level model. It is used when translating a given output spec into another connection target

  • when connecting a model port to a concrete external output
  • when connecting a timeline to a viewer element
  • for implementing the viewer input selection "switchboard"
  • for translating output designation of virtual clips OutputMapping is to be used as value object, holding concrete connections and wiring. For each of the mentioned usage situations, it needs to be adapted specifically, which is achieved by template (generic) programming: The usage situation provides a definition context DEF to fill in the variable parts of the implementation. This definition context is actually instantiated (as base class). The mapping table actually just stores an association of hash values, which typically are interpreted as asset::ID<Pipe>. But the actual mapping result is retrieved on each access by invoking a functor on the stored hash value, thus the final resolution is done late.
See also
OutputDesignation
OutputMapping_test

Definition in file output-mapping.hpp.

#include "lib/error.hpp"
#include "lib/util.hpp"
#include "lib/hash-value.h"
#include "steam/asset/pipe.hpp"
#include "common/query.hpp"
#include <boost/operators.hpp>
#include <map>

Classes

class  _def< DEF >
 
class  OutputMapping< DEF >
 OutputMapping is a facility to resolve output designations. More...
 
struct  _def< DEF >::Rebind< FUN >
 
struct  _def< DEF >::Rebind< RET(DEF::*)(PId)>
 
class  OutputMapping< DEF >::Resolver
 

Functions

Query< asset::Pipebuild_corresponding_sourceQuery (Query< asset::Pipe > const &)
 ..and build the corresponding defaults source query for this case
 
uint is_defaults_query_with_channel (Query< asset::Pipe > const &)
 detect the special case, when actually the Nth solution of a defaults query is requested
 
HashVal resolveQuery (Query< asset::Pipe > const &)
 delegate target pipe resolution to the rules system More...
 
HashVal slot (Query< asset::Pipe > const &)
 yield a suitable table slot for this query More...
 

Namespaces

 steam
 Steam-Layer implementation namespace root.
 
 steam::mobject
 Media-Objects, edit operations and high-level session.
 

Class Documentation

◆ steam::mobject::anonymous_namespace{output-mapping.hpp}::_def::Rebind

struct steam::mobject::anonymous_namespace{output-mapping.hpp}::_def::Rebind
+ Collaboration diagram for _def< DEF >::Rebind< FUN >:

◆ steam::mobject::anonymous_namespace{output-mapping.hpp}::_def::Rebind< RET(DEF::*)(PId)>

struct steam::mobject::anonymous_namespace{output-mapping.hpp}::_def::Rebind< RET(DEF::*)(PId)>
Class Members
typedef RET Res
+ Collaboration diagram for _def< DEF >::Rebind< RET(DEF::*)(PId)>:

Function Documentation

◆ slot()

HashVal slot ( Query< asset::Pipe > const &  query)

yield a suitable table slot for this query

to allow for the use of queries mixed with normal Pipe-IDs in a single table, we rely on the hash_value() function, to be picked up by ADL

Definition at line 162 of file output-designation.cpp.

References steam::mobject::_mapping::slot().

Referenced by steam::mobject::_mapping::slot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveQuery()

HashVal resolveQuery ( Query< asset::Pipe > const &  query4pipe)

delegate target pipe resolution to the rules system

Parameters
Queryfor pipe, which is handed over as-is to the rules engine.
Returns
key for a table slot to hold the associated mapping. This slot is assumed to contain the mapped Pipe-ID for the given query – including the possibility of a zero hash to signal an unconnected mapping.

Definition at line 173 of file output-designation.cpp.

References ConfigResolver::instance, QueryHandler< TY >::resolve(), and steam::mobject::_mapping::resolveQuery().

Referenced by steam::mobject::_mapping::resolveQuery().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: