7 #ifndef __data_Config_h__ 8 #define __data_Config_h__ 27 T &cfg(
const String &a_key);
30 virtual bool configLookup(
const String &a_key,
Instance &a_instance);
33 virtual void configSet(
const String &a_key,
Record &a_record,
39 std::map<String, Instance> m_catalog;
43 T &Config::cfg(
const String &a_key)
46 bool preexists = configLookup(a_key, instance);
50 return instance.cast<T>();
53 if(!registry().isValid())
55 feX(
"Config Components must be created so as to have a registry");
58 Instance &new_instance = m_catalog[a_key];
59 new_instance.create<T>(spTM);
60 return new_instance.cast<T>();
Convienience base class for specification and use of path accessors.
Definition: Config.h:19
ConfigI Interface See Config (implementation) for the interesting details.
Definition: ConfigI.h:19
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
sp< Master > master(void) const
Access the Master (ptr may not be valid)
Definition: Registry.cc:98