#include <structfactoryimpl.hpp>

concerning how configuration queries are resolved and when to create new objects automatically.
Definition at line 86 of file structfactoryimpl.hpp.
Public Member Functions | |
| template<> | |
| Pipe * | fabricate (const Query< Pipe > &caps) |
| template<> | |
| const ProcPatt * | fabricate (const Query< const ProcPatt > &caps) |
| template<> | |
| Track * | fabricate (const Query< Track > &caps) |
| template<class STRU> | |
| STRU * | fabricate (const Query< STRU > &caps) |
| make a new structural asset instance. | |
| StructFactoryImpl (StructFactory &interface) | |
Private Member Functions | |
| template<class STRU> | |
| const Asset::Ident | createIdent (const Query< STRU > &query) |
Private Attributes | |
| StructFactory & | recursive_create_ |
| used for issuing recursive create calls to top level | |
| const Asset::Ident asset::StructFactoryImpl::createIdent | ( | const Query< STRU > & | query | ) | [inline, private] |
For internal use only.
derive a sensible asset ident tuple when creating structural asset instances based on a capability query
Definition at line 94 of file structfactoryimpl.hpp.
References asset::str().
00095 { 00096 string name (query); 00097 string nameID = extractID (Traits<STRU>::idSymbol, query); 00098 if (isnil (nameID)) 00099 { 00100 // no name-ID contained in the query... 00101 // so we'll create a new one 00102 static int i=0; 00103 static format namePattern ("%s.%d"); 00104 static format predPattern ("%s(%s), "); 00105 nameID = str(namePattern % Traits<STRU>::namePrefix % (++i) ); 00106 name.insert(0, 00107 str(predPattern % Traits<STRU>::idSymbol % nameID )); 00108 } 00109 ENSURE (!isnil (name)); 00110 ENSURE (!isnil (nameID)); 00111 ENSURE (contains (name, nameID)); 00112 00113 Category cat (STRUCT, Traits<STRU>::catFolder); 00114 return Asset::Ident (name, cat ); 00115 }

| STRU* asset::StructFactoryImpl::fabricate | ( | const Query< STRU > & | caps | ) | [inline] |
make a new structural asset instance.
default/fallback impl. throws.
Definition at line 136 of file structfactoryimpl.hpp.
References lumiera::Query< OBJ >::asKey(), and asset::str().
00137 { 00138 throw lumiera::error::Config ( str(format("The following Query could not be resolved: %s.") % caps.asKey()) 00139 , LUMIERA_ERROR_CAPABILITY_QUERY ); 00140 }

used for issuing recursive create calls to top level
Definition at line 123 of file structfactoryimpl.hpp.
1.5.6