ComponentFactory.h Source File
Back to the index.
Go to the documentation of this file. 1 #ifndef COMPONENTFACTORY_H
2 #define COMPONENTFACTORY_H
77 const string& componentNameAndOptionalArgs,
GXemul* gxemul = NULL);
88 static string GetAttribute(
const string& name,
const string&
101 static bool HasAttribute(
const string& name,
const string&
129 string (*getAttributeFunc)(
const string& attributeName));
145 static void RunUnitTests(
int& nSucceeded,
int& nFailures);
149 #endif // COMPONENTFACTORY_H
static bool GetCreationArgOverrides(ComponentCreationSettings &settings, const ComponentCreateArgs &createArgs)
Get override arguments for component creation.
static vector< string > GetAllComponentNames(bool onlyTemplates)
Returns a vector of all available component names.
static bool RegisterComponentClass(const char *name, refcount_ptr< Component >(*createFunc)(const ComponentCreateArgs &args), string(*getAttributeFunc)(const string &attributeName))
Adds a new component class to the factory at runtime.
A factory which creates Component objects.
static void RunUnitTests(int &nSucceeded, int &nFailures)
static void UnregisterAllComponentClasses()
Unregisters all manually registered component classes.
static refcount_ptr< Component > CreateComponent(const string &componentNameAndOptionalArgs, GXemul *gxemul=NULL)
Creates a component given a short component name.
static string GetAttribute(const string &name, const string &attributeName)
Gets a specific attribute value for a component.
map< string, string > ComponentCreationSettings
Base class for unit testable classes.
static bool HasAttribute(const string &name, const string &attributeName)
Checks if a component has a specific attribute.
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17