org.ogre4j
Interface IResourceManager

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, INativeObject, IResourceAllocatedObject, IScriptLoader
All Known Subinterfaces:
ICompositorManager, IFontManager, IGpuProgramManager, IHighLevelGpuProgramManager, IMaterialManager, IMeshManager, ISkeletonManager, ITextureManager
All Known Implementing Classes:
CompositorManager, FontManager, GpuProgramManager, HighLevelGpuProgramManager, MaterialManager, MeshManager, ResourceManager, SkeletonManager, TextureManager

public interface IResourceManager
extends INativeObject, IScriptLoader, IResourceAllocatedObject


Nested Class Summary
static interface IResourceManager.IResourceCreateOrRetrieveResult
           
static interface IResourceManager.IResourceHandleMap
           
static interface IResourceManager.IResourceMap
           
static interface IResourceManager.IResourceMapIterator
           
 
Method Summary
 void _notifyResourceLoaded(IResource res)
          Notify this manager that a resource which it manages has been loaded.
 void _notifyResourceTouched(IResource res)
          Notify this manager that a resource which it manages has been 'touched', i.e. used.
 void _notifyResourceUnloaded(IResource res)
          Notify this manager that a resource which it manages has been unloaded.
 void create(IResourcePtr returnValue, java.lang.String name, java.lang.String group, boolean isManual, IManualResourceLoader loader, INameValuePairList createParams)
          Creates a new blank resource, but does not immediately load it.
 void createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue, java.lang.String name, java.lang.String group, boolean isManual, IManualResourceLoader loader, INameValuePairList createParams)
          Create a new resource, or retrieve an existing one with the same name if it already exists.
 void getByHandle(IResourcePtr returnValue, long handle)
          Retrieves a pointer to a resource by handle, or null if the resource does not exist.
 void getByName(IResourcePtr returnValue, java.lang.String name)
          Retrieves a pointer to a resource by name, or null if the resource does not exist.
 float getLoadingOrder()
          Gets the relative loading order of resources of this type.
 int getMemoryBudget()
          Get the limit on the amount of memory this resource handler may use.
 int getMemoryUsage()
          Gets the current memory usage, in bytes.
 void getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
          Returns an iterator over all resources in this manager.
 java.lang.String getResourceType()
          Gets a string identifying the type of resource this manager handles.
 IStringVector getScriptPatterns()
          Gets the file patterns which should be used to find scripts for this .
 boolean getVerbose()
          Gets whether this manager and its resources habitually produce log output
 void load(IResourcePtr returnValue, java.lang.String name, java.lang.String group, boolean isManual, IManualResourceLoader loader, INameValuePairList loadParams)
          Generic load method, used to create a specific to this without using one of the specialised 'load' methods (containing per-Resource-type parameters).
 void parseScript(IDataStreamPtr stream, java.lang.String groupName)
          Parse the definition of a set of resources from a script file.
 void prepare(IResourcePtr returnValue, java.lang.String name, java.lang.String group, boolean isManual, IManualResourceLoader loader, INameValuePairList loadParams)
          Generic prepare method, used to create a specific to this without using one of the specialised 'prepare' methods (containing per-Resource-type parameters).
 void reloadAll(boolean reloadableOnly)
          Caused all currently loaded resources to be reloaded.
 void reloadUnreferencedResources(boolean reloadableOnly)
          Caused all currently loaded but not referenced by any other object resources to be reloaded.
 void remove(IResourcePtr r)
          Remove a single resource.
 void remove(long handle)
          Remove a single resource by handle.
 void remove(java.lang.String name)
          Remove a single resource by name.
 void removeAll()
          Removes all resources.
 boolean resourceExists(long handle)
           
 boolean resourceExists(java.lang.String name)
           
 void setMemoryBudget(int bytes)
          Set a limit on the amount of memory this resource handler may use.
 void setVerbose(boolean v)
          Sets whether this manager and its resources habitually produce log output
 void unload(long handle)
          Unloads a single resource by handle.
 void unload(java.lang.String name)
          Unloads a single resource by name.
 void unloadAll(boolean reloadableOnly)
          Unloads all resources.
 void unloadUnreferencedResources(boolean reloadableOnly)
          Unload all resources which are not referenced by any other object.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

create

void create(IResourcePtr returnValue,
            java.lang.String name,
            java.lang.String group,
            boolean isManual,
            IManualResourceLoader loader,
            INameValuePairList createParams)
Creates a new blank resource, but does not immediately load it.


createOrRetrieve

void createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
                      java.lang.String name,
                      java.lang.String group,
                      boolean isManual,
                      IManualResourceLoader loader,
                      INameValuePairList createParams)
Create a new resource, or retrieve an existing one with the same name if it already exists.


setMemoryBudget

void setMemoryBudget(int bytes)
Set a limit on the amount of memory this resource handler may use.


getMemoryBudget

int getMemoryBudget()
Get the limit on the amount of memory this resource handler may use.


getMemoryUsage

int getMemoryUsage()
Gets the current memory usage, in bytes.


unload

void unload(java.lang.String name)
Unloads a single resource by name.


unload

void unload(long handle)
Unloads a single resource by handle.


unloadAll

void unloadAll(boolean reloadableOnly)
Unloads all resources.


reloadAll

void reloadAll(boolean reloadableOnly)
Caused all currently loaded resources to be reloaded.


unloadUnreferencedResources

void unloadUnreferencedResources(boolean reloadableOnly)
Unload all resources which are not referenced by any other object.


reloadUnreferencedResources

void reloadUnreferencedResources(boolean reloadableOnly)
Caused all currently loaded but not referenced by any other object resources to be reloaded.


remove

void remove(IResourcePtr r)
Remove a single resource.


remove

void remove(java.lang.String name)
Remove a single resource by name.


remove

void remove(long handle)
Remove a single resource by handle.


removeAll

void removeAll()
Removes all resources.


getByName

void getByName(IResourcePtr returnValue,
               java.lang.String name)
Retrieves a pointer to a resource by name, or null if the resource does not exist.


getByHandle

void getByHandle(IResourcePtr returnValue,
                 long handle)
Retrieves a pointer to a resource by handle, or null if the resource does not exist.


resourceExists

boolean resourceExists(java.lang.String name)

resourceExists

boolean resourceExists(long handle)

_notifyResourceTouched

void _notifyResourceTouched(IResource res)
Notify this manager that a resource which it manages has been 'touched', i.e. used.


_notifyResourceLoaded

void _notifyResourceLoaded(IResource res)
Notify this manager that a resource which it manages has been loaded.


_notifyResourceUnloaded

void _notifyResourceUnloaded(IResource res)
Notify this manager that a resource which it manages has been unloaded.


prepare

void prepare(IResourcePtr returnValue,
             java.lang.String name,
             java.lang.String group,
             boolean isManual,
             IManualResourceLoader loader,
             INameValuePairList loadParams)
Generic prepare method, used to create a specific to this without using one of the specialised 'prepare' methods (containing per-Resource-type parameters).


load

void load(IResourcePtr returnValue,
          java.lang.String name,
          java.lang.String group,
          boolean isManual,
          IManualResourceLoader loader,
          INameValuePairList loadParams)
Generic load method, used to create a specific to this without using one of the specialised 'load' methods (containing per-Resource-type parameters).


getScriptPatterns

IStringVector getScriptPatterns()
Gets the file patterns which should be used to find scripts for this .

Specified by:
getScriptPatterns in interface IScriptLoader

parseScript

void parseScript(IDataStreamPtr stream,
                 java.lang.String groupName)
Parse the definition of a set of resources from a script file.

Specified by:
parseScript in interface IScriptLoader

getLoadingOrder

float getLoadingOrder()
Gets the relative loading order of resources of this type.

Specified by:
getLoadingOrder in interface IScriptLoader

getResourceType

java.lang.String getResourceType()
Gets a string identifying the type of resource this manager handles.


setVerbose

void setVerbose(boolean v)
Sets whether this manager and its resources habitually produce log output


getVerbose

boolean getVerbose()
Gets whether this manager and its resources habitually produce log output


getResourceIterator

void getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
Returns an iterator over all resources in this manager.



Copyright © 2007 netAllied GmbH. All Rights Reserved.