Om
1.0.0
A universal framework for multimedia simulation
|
An interface for classes that manage editors for arbitrary resource types. More...
#include <omResourceEditorManager.h>
Public Member Functions | |
ResourceEditorManager () | |
Create a new empty resource editor manager that has no types it can edit. More... | |
~ResourceEditorManager () | |
Destroy a resource editor manager and release its internal resources. More... | |
OM_INLINE Size | getTypeCount () const |
Return the number of resource types that this editor manager can edit. More... | |
ResourceTypeEditorFactory * | getType (Index typeIndex) const |
Return a pointer to the type editior factor at the specified index. More... | |
ResourceTypeEditorFactory * | getType (const ResourceType &type) const |
Return a pointer to the type editior factor for the specified resource type. More... | |
Bool | addType (ResourceTypeEditorFactory *newType) |
Add a new resource type editor to this editor manager. More... | |
Bool | removeType (const ResourceType &type) |
Remove the specified resource type from this editor manager. More... | |
void | clearTypes () |
Remove all type editors from this manager. More... | |
void | addModule (EditorModule &module) |
Add all of the editors from the specified module to this resource manager. More... | |
OpaqueResource | newResource (const ResourceType &type, Index subTypeIndex, ResourceSet &resourceSet) const |
Create and return a new resource of the specified type and subtype. More... | |
OpaqueResource | newResource (const ResourceType &type, const ResourceSubType &subType, ResourceSet &resourceSet) const |
Create and return a new resource of the specified type and subtype. More... | |
Shared< ResourceTypeEditor > | newEditor (const OpaqueResource &resource, const EditorServices &services) const |
Create and return a new editor for the specified opaque resource. More... | |
virtual Shared< SpatialObject > | getSpatialObject (const OpaqueResource &resource, const EditorServices &services) const |
Construct and return a pointer to the spatial representation of the specified resource object of this type. More... | |
An interface for classes that manage editors for arbitrary resource types.
om::editors::base::ResourceEditorManager::ResourceEditorManager | ( | ) |
Create a new empty resource editor manager that has no types it can edit.
om::editors::base::ResourceEditorManager::~ResourceEditorManager | ( | ) |
Destroy a resource editor manager and release its internal resources.
Return the number of resource types that this editor manager can edit.
|
inline |
Return a pointer to the type editior factor at the specified index.
ResourceTypeEditorFactory* om::editors::base::ResourceEditorManager::getType | ( | const ResourceType & | type | ) | const |
Return a pointer to the type editior factor for the specified resource type.
Bool om::editors::base::ResourceEditorManager::addType | ( | ResourceTypeEditorFactory * | newType | ) |
Add a new resource type editor to this editor manager.
The method returns whether or not the new type was able to be added. If there is already another resource editor for the given resource type, it is replaced with the new one.
Bool om::editors::base::ResourceEditorManager::removeType | ( | const ResourceType & | type | ) |
Remove the specified resource type from this editor manager.
void om::editors::base::ResourceEditorManager::clearTypes | ( | ) |
Remove all type editors from this manager.
void om::editors::base::ResourceEditorManager::addModule | ( | EditorModule & | module | ) |
Add all of the editors from the specified module to this resource manager.
OpaqueResource om::editors::base::ResourceEditorManager::newResource | ( | const ResourceType & | type, |
Index | subTypeIndex, | ||
ResourceSet & | resourceSet | ||
) | const |
Create and return a new resource of the specified type and subtype.
If a resource is not able to be created, a NULL pointer is returned.
OpaqueResource om::editors::base::ResourceEditorManager::newResource | ( | const ResourceType & | type, |
const ResourceSubType & | subType, | ||
ResourceSet & | resourceSet | ||
) | const |
Create and return a new resource of the specified type and subtype.
If a resource is not able to be created, a NULL pointer is returned.
Shared<ResourceTypeEditor> om::editors::base::ResourceEditorManager::newEditor | ( | const OpaqueResource & | resource, |
const EditorServices & | services | ||
) | const |
Create and return a new editor for the specified opaque resource.
If an editor is not able to be created for the resource, a NULL pointer is returned.
|
virtual |
Construct and return a pointer to the spatial representation of the specified resource object of this type.
The default implementation returns a NULL pointer, indicating that the resource does not have a spatial representation.
The same pointer may be returned more than once if a spatial object is requested for the same resource in multiple contexts.