MpResourceFactory is used to construct resources by type name.
More...
#include <MpResourceFactory.h>
MpResourceFactory is used to construct resources by type name.
MpResourceConstructors are added to the MpResourceFactory and registered with a resource type name. Resources are then constructed using the MpResourceFactory.
Disabled copy constructor
Add a constructor for a new resource type.
OsStatus newResource |
( |
const UtlString & |
resourceType, |
|
|
const UtlString & |
newResourceName, |
|
|
int |
maxResourcesToCreate, |
|
|
int & |
numResourcesCreated, |
|
|
MpResource * |
resourcesCreated[] |
|
) |
| const |
Create a new resource of given type.
Creates one or more resources as defined by the implementation of the named resource constructor (typically of different resource types as opposed to duplicates). Some resources are created in sets as they work together in some way. This interface allows the constructor to create multiple resources and assocate or initialize them together.
- Parameters
-
[in] | newResourceName | - name to give the new resource, must be unique to the target flowgraph that this resource is to be inserted. |
[in] | maxResourcesToCreate | - the size of the resourcesCreated passed in |
[out] | numResourcesCreated | - the actual number of resource created and contained in the resourcesCreated array |
[out] | resourcesCreated | - array containing the created resources. |
UtlBoolean constructorExists |
( |
const UtlString & |
resourceType | ) |
|
Disable assignment operator