Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::editors::base::ResourceTypeEditorFactory Class Referenceabstract

An interface for classes that creates editors for a resource type. More...

#include <omResourceTypeEditorFactory.h>

Inheritance diagram for om::editors::base::ResourceTypeEditorFactory:
om::editors::types::CameraEditor::Factory om::editors::types::ConstraintEditor::Factory om::editors::types::ForceEditor::Factory om::editors::types::ForceFieldEditor::Factory om::editors::types::GraphicsMaterialEditor::Factory om::editors::types::GraphicsObjectEditor::Factory om::editors::types::GraphicsShapeEditor::Factory om::editors::types::ImageEditor::Factory om::editors::types::PhysicsMaterialEditor::Factory om::editors::types::PhysicsObjectEditor::Factory om::editors::types::PhysicsShapeEditor::Factory om::editors::types::PrototypeEditor::Factory om::editors::types::ResourceGroupEditor::Factory om::editors::types::ResourceSetEditor::Factory om::editors::types::SceneEditor::Factory om::editors::types::SequencerEditor::Factory om::editors::types::SoundEditor::Factory om::editors::types::SoundListenerEditor::Factory om::editors::types::SoundMaterialEditor::Factory om::editors::types::SoundObjectEditor::Factory om::editors::types::SoundPluginEditor::Factory om::editors::types::SoundShapeEditor::Factory om::editors::types::SoundSourceEditor::Factory

Public Member Functions

virtual ~ResourceTypeEditorFactory ()
 Destroy the resource type editor factory. More...
 
virtual const ResourceTypegetResourceType () const =0
 Return the resource type that this editor is able to edit. More...
 
virtual UTF8String getResourceTypeDisplayName () const
 Return the display name that is used for this factory's resource type. More...
 
virtual ResourceCategory getResourceTypeCategory () const
 Return the category of resource type this type belongs to. More...
 
virtual EditorTypeFlags getResourceTypeFlags () const
 Return an object containing boolean flags for this resource type. More...
 
virtual Size getResourceSubTypeCount () const
 Return the number of subtypes there are for this type editor factory. More...
 
virtual ResourceSubType getResourceSubType (Index subTypeIndex) const
 Return the name of the subtype with the specified index. More...
 
virtual ResourceSubType getResourceSubType (const OpaqueResource &resource) const
 Return the index of the subtype for the given resource. More...
 
virtual Bool getResourceSubTypeIndex (const ResourceSubType &subType, Index &subTypeIndex) const
 Get the index of the specified subtype. More...
 
virtual UTF8String getResourceSubTypeDisplayName (Index subTypeIndex) const
 Return the display name of the subtype with the specified index. More...
 
virtual GUIImage getResourceSubTypeIcon (Index subTypeIndex, const Vector2f &size) const
 Return an image that represents the icon for the resource sub type with the specified index. More...
 
virtual GUIImage getResourceTypeIcon (const Vector2f &size) const
 Return an image that represents the icon for the resource type. More...
 
virtual GUIImage getResourceIcon (const OpaqueResource &resource, const Vector2f &size) const
 Return an image that represents the icon for the specified resource. More...
 
virtual OpaqueResource newResource (Index subTypeIndex, ResourceSet &resourceSet) const =0
 Create a new default instance of this resource type in the resource set and return a pointer to the resource. More...
 
virtual OpaqueResource newResource (const ResourceSubType &subType, ResourceSet &resourceSet) const
 Create a new default instance of this resource type in the resource set and return a pointer to the resource. More...
 
virtual Shared< ResourceTypeEditornewEditor (const OpaqueResource &resource, const EditorServices &services) const
 Create a new editor for a resource of this factory's resource type. More...
 
virtual Shared< SpatialObjectgetSpatialObject (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...
 

Detailed Description

An interface for classes that creates editors for a resource type.

Constructor & Destructor Documentation

virtual om::editors::base::ResourceTypeEditorFactory::~ResourceTypeEditorFactory ( )
inlinevirtual

Destroy the resource type editor factory.

Member Function Documentation

virtual const ResourceType& om::editors::base::ResourceTypeEditorFactory::getResourceType ( ) const
pure virtual
virtual UTF8String om::editors::base::ResourceTypeEditorFactory::getResourceTypeDisplayName ( ) const
virtual
virtual ResourceCategory om::editors::base::ResourceTypeEditorFactory::getResourceTypeCategory ( ) const
virtual
virtual EditorTypeFlags om::editors::base::ResourceTypeEditorFactory::getResourceTypeFlags ( ) const
virtual

Return an object containing boolean flags for this resource type.

virtual Size om::editors::base::ResourceTypeEditorFactory::getResourceSubTypeCount ( ) const
virtual
virtual ResourceSubType om::editors::base::ResourceTypeEditorFactory::getResourceSubType ( Index  subTypeIndex) const
virtual
virtual ResourceSubType om::editors::base::ResourceTypeEditorFactory::getResourceSubType ( const OpaqueResource resource) const
virtual

Return the index of the subtype for the given resource.

The default implementation returns an UNDEFINED resource subtype, indicating there is no subtype.

virtual Bool om::editors::base::ResourceTypeEditorFactory::getResourceSubTypeIndex ( const ResourceSubType subType,
Index subTypeIndex 
) const
virtual

Get the index of the specified subtype.

virtual UTF8String om::editors::base::ResourceTypeEditorFactory::getResourceSubTypeDisplayName ( Index  subTypeIndex) const
virtual
virtual GUIImage om::editors::base::ResourceTypeEditorFactory::getResourceSubTypeIcon ( Index  subTypeIndex,
const Vector2f &  size 
) const
virtual
virtual GUIImage om::editors::base::ResourceTypeEditorFactory::getResourceTypeIcon ( const Vector2f &  size) const
virtual
virtual GUIImage om::editors::base::ResourceTypeEditorFactory::getResourceIcon ( const OpaqueResource resource,
const Vector2f &  size 
) const
virtual

Return an image that represents the icon for the specified resource.

This allows each resource to have a potentially unique icon that better represents its state. The default implementation returns the type's default icon.

Reimplemented in om::editors::types::GraphicsShapeEditor::Factory, om::editors::types::PhysicsShapeEditor::Factory, and om::editors::types::SoundShapeEditor::Factory.

virtual OpaqueResource om::editors::base::ResourceTypeEditorFactory::newResource ( Index  subTypeIndex,
ResourceSet resourceSet 
) const
pure virtual
virtual OpaqueResource om::editors::base::ResourceTypeEditorFactory::newResource ( const ResourceSubType subType,
ResourceSet resourceSet 
) const
virtual

Create a new default instance of this resource type in the resource set and return a pointer to the resource.

virtual Shared<ResourceTypeEditor> om::editors::base::ResourceTypeEditorFactory::newEditor ( const OpaqueResource resource,
const EditorServices services 
) const
virtual
virtual Shared<SpatialObject> om::editors::base::ResourceTypeEditorFactory::getSpatialObject ( const OpaqueResource resource,
const EditorServices services 
) const
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.

Reimplemented in om::editors::types::GraphicsObjectEditor::Factory, om::editors::types::PhysicsShapeEditor::Factory, and om::editors::types::GraphicsShapeEditor::Factory.


The documentation for this class was generated from the following file: