Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
StructFactoryImpl Class Reference

#include "steam/asset/struct-factory-impl.hpp"

Description

Implementation details, especially concerning how configuration queries are resolved and when to create new objects automatically.

Todo:

better use a general struct traits class, esp.for creating the Ident

shouldn't some of the generic factory logic be moved over into the struct baseclass? ////////////////TICKET #565

Definition at line 95 of file struct-factory-impl.hpp.

Public Member Functions

 StructFactoryImpl (StructFactory &interface)
 
template<class STRU >
STRU * fabricate (Query< STRU > const &caps)
 make a new structural asset instance.
 
template<>
const ProcPattfabricate (Query< const ProcPatt > const &caps)
 
template<>
Pipefabricate (Query< Pipe > const &caps)
 
template<>
Timelinefabricate (Query< Timeline > const &caps)
 
template<>
Sequencefabricate (Query< Sequence > const &caps)
 

Private Member Functions

template<class STRU >
const Asset::Ident createIdent (Query< STRU > const &query)
 
RFork getFork_forSequence (string const &desiredID)
 either fetch or build a suitable fork root for a new sequence
 

Private Attributes

StructFactoryrecursive_create_
 used for issuing recursive create calls to top level
 

Constructor & Destructor Documentation

◆ StructFactoryImpl()

StructFactoryImpl ( StructFactory interface)
inline

Definition at line 159 of file struct-factory-impl.hpp.

Member Function Documentation

◆ createIdent()

template<class STRU >
const Asset::Ident createIdent ( Query< STRU > const &  query)
inlineprivate

derive a sensible asset ident tuple when creating structural asset instances based on a capability query

Definition at line 103 of file struct-factory-impl.hpp.

References Query< RES >::extractID(), StructTraits< STRU >::namePrefix(), and steam::asset::STRUCT.

Referenced by StructFactoryImpl::fabricate(), StructFactoryImpl::fabricate(), StructFactoryImpl::fabricate(), and StructFactoryImpl::fabricate().

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

◆ getFork_forSequence()

RFork getFork_forSequence ( string const &  desiredID)
inlineprivate

either fetch or build a suitable fork root for a new sequence

Definition at line 132 of file struct-factory-impl.hpp.

References Scope::containing(), MObject::create, Session::current, Session::elements, Session::getRoot(), Scope::isRoot(), and ElementQuery::pick().

+ Here is the call graph for this function:

◆ fabricate() [1/5]

template<class STRU >
STRU * fabricate ( Query< STRU > const &  caps)
inline

make a new structural asset instance.

Warning
default/fallback implementation just throws.
Todo:
a real implementation using a resolution engine.

Definition at line 170 of file struct-factory-impl.hpp.

◆ fabricate() [2/5]

template<>
const ProcPatt * fabricate ( Query< const ProcPatt > const &  caps)
inline

Definition at line 183 of file struct-factory-impl.hpp.

References StructFactoryImpl::createIdent().

+ Here is the call graph for this function:

◆ fabricate() [3/5]

template<>
Pipe * fabricate ( Query< Pipe > const &  caps)
inline

Definition at line 191 of file struct-factory-impl.hpp.

References StructFactoryImpl::createIdent(), Session::current, Session::defaults, and Query< RES >::extractID().

+ Here is the call graph for this function:

◆ fabricate() [4/5]

template<>
Timeline * fabricate ( Query< Timeline > const &  caps)
inline

Definition at line 205 of file struct-factory-impl.hpp.

References AutoRegistered< Timeline >::create(), MObject::create, StructFactoryImpl::createIdent(), Session::current, Query< RES >::extractID(), P< TAR, BASE >::get(), Session::getRoot(), and StructFactoryImpl::recursive_create_.

+ Here is the call graph for this function:

◆ fabricate() [5/5]

template<>
Sequence * fabricate ( Query< Sequence > const &  caps)
inline

Definition at line 222 of file struct-factory-impl.hpp.

References AutoRegistered< Sequence >::create(), StructFactoryImpl::createIdent(), and Query< RES >::extractID().

+ Here is the call graph for this function:

Member Data Documentation

◆ recursive_create_

StructFactory& recursive_create_
private

used for issuing recursive create calls to top level

Definition at line 156 of file struct-factory-impl.hpp.

Referenced by StructFactoryImpl::fabricate().

+ Collaboration diagram for StructFactoryImpl:

The documentation for this class was generated from the following file: