43#ifndef STEAM_MOBJECT_OUTPUT_MAPPING_H
44#define STEAM_MOBJECT_OUTPUT_MAPPING_H
71 template<
typename FUN>
74 template<
typename RET>
193 REQUIRE (newPipe2map);
194 pID_ = newPipe2map->getID();
212 throw error::Logic{
"attempt to resolve an unconnected output mapping"
213 ,
LERR_(UNCONNECTED)};
224 operator bool()
const
263 or this->
contains (sourcePipe->getID());
272 return DEF::output (mappedPipeID);
278 ASSERT (this->
contains (tableSlot));
291 HashVal slot (Query<asset::Pipe>
const&);
320 inline OutputMapping<DEF>::Resolver
323 if (not contains (sourcePipeID))
329 return buildResolutionWrapper (sourcePipeID);
340 return (*
this) [pipe->getID()];
379 if (not contains (hash4query))
382 auto addEntry = [&](
auto query)
391 PPipe corresponding_sourcePipe
394 ENSURE (corresponding_sourcePipe);
396 PId sourcePipeID = corresponding_sourcePipe->getID();
397 addEntry (DEF::buildQuery (sourcePipeID, seqNr));
400 addEntry (query4pipe);
403 ENSURE (this->contains (hash4query));
404 return buildResolutionWrapper (hash4query);
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
static StructFactory retrieve
storage for the static StructFactory instance
OutputMapping & thisMapping_
friend bool operator==(Resolver const &a, Resolver const &b)
Resolver(OutputMapping &container, HashVal &resultVal)
bool isValid() const
< is this a valid connected mapping?
Resolver & operator=(Resolver const &)
OutputMapping is a facility to resolve output designations.
std::map< HashVal, HashVal > table_
bool contains(PId mapping4sourcePipeID)
Resolver buildResolutionWrapper(HashVal tableSlot)
bool contains(PPipe sourcePipe)
Resolver operator[](PId sourcePipeID)
standard map-style access to an OutputMapping.
Target resolveTarget(PId mappedPipeID)
asset::ID< asset::Pipe > PId
asset::ID< asset::Pipe > PId
Rebind< OutputMappingMemberFunc > Rebinder
decltype(&DEF::output) OutputMappingMemberFunc
Lumiera error handling (C++ interface).
Hash value types and utilities.
size_t HashVal
a STL compatible hash value
LumieraError< LERR_(LOGIC)> Logic
Query< asset::Pipe > build_corresponding_sourceQuery(Query< asset::Pipe > const &query4pipe)
..and build the corresponding defaults source query for this case
uint is_defaults_query_with_channel(Query< asset::Pipe > const &query4pipe)
detect the special case, when actually the Nth solution of a defaults query is requested
HashVal slot(Query< asset::Pipe > const &query)
yield a suitable table slot for this query
HashVal resolveQuery(Query< asset::Pipe > const &query4pipe)
delegate target pipe resolution to the rules system
Steam-Layer implementation namespace root.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
A "processing pipe" represented as Asset.
Basic and generic representation of an internal query.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...