SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_view_SubphraseGeneratorFactory_h
11 #define smtk_view_SubphraseGeneratorFactory_h
13 #include "smtk/CoreExports.h"
14 #include "smtk/common/Factory.h"
15 #include "smtk/view/SubphraseGenerator.h"
28 std::unique_ptr<SubphraseGenerator> createFromConfiguration(
33 return std::unique_ptr<SubphraseGenerator>();
36 bool haveType = config->
attribute(
"Type", sgType);
37 if (!haveType || sgType.empty() || sgType ==
"default")
39 sgType = smtk::common::typeName<SubphraseGenerator>();
41 return this->createFromName(sgType);
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
A factory to create suphrase generators which is held by view managers.
Definition: SubphraseGeneratorFactory.h:24
bool attribute(const std::string &attname, std::string &value) const
Returns true if the component has an attribute called name and will set value to the attribute's valu...
Definition: Configuration.cxx:123
A Factory is a class that constructs instances of registered classes which all inherit a common BaseT...
Definition: Factory.h:112
Configure one item in a view, which may contain children.
Definition: Configuration.h:32