VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Properties
VisimBox.Resources.IResource Interface Reference

Interface for resource. More...

Inheritance diagram for VisimBox.Resources.IResource:

List of all members.

## Public Member Functions
void | AddReference (IResourceConsumer consumer)
| Adds reference to this resource.
void | RemoveReference (IResourceConsumer consumer)
| Removes reference to this resource.
bool | ReplaceReferences (IResource newresource)
| Manager wants to replace this resource by another - resource should inform all of it's consumers that it's being replaced and update references based on their response It should also check if new resource is of compatible type.
## Properties
ResourceType | ResourceType`[get]`
| Generic type of the resource.
ResourceUsage | Usage`[get]`
| Type of the resource usage (static/dynamic)
string | FileName`[get, set]`
| File used to create the resource (if it was loaded from the disk)
int | References`[get]`
| Number of current references, 0 means no references.
int | NullReferences`[get]`
| Returns number of null generic references.
bool | AlwaysStay`[get, set]`
| If true, resource will stay in memory even if it's not referenced.

## Detailed Description

Interface for resource.

## Member Function Documentation

void VisimBox.Resources.IResource.AddReference | ( | IResourceConsumer | consumer | ) |

Adds reference to this resource.

Parameters:

  consumer | Consumer of resource. Note, can be null for generic reference

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

void VisimBox.Resources.IResource.RemoveReference | ( | IResourceConsumer | consumer | ) |

Removes reference to this resource.

Parameters:

  consumer | Consumer of resource. Note, can be null for generic reference.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

bool VisimBox.Resources.IResource.ReplaceReferences | ( | IResource | newresource | ) |

Manager wants to replace this resource by another - resource should inform all of it's consumers that it's being replaced and update references based on their response It should also check if new resource is of compatible type.

Parameters:

  newresource | New resource

Returns:
  True if resource is compatible type and all consumers accepted resource changing, false otherwise

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

## Property Documentation

bool VisimBox.Resources.IResource.AlwaysStay`[get, set]`

If true, resource will stay in memory even if it's not referenced.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

string VisimBox.Resources.IResource.FileName`[get, set]`

File used to create the resource (if it was loaded from the disk)

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, VisimBox.Resources.Resource< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

int VisimBox.Resources.IResource.NullReferences`[get]`

Returns number of null generic references.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

int VisimBox.Resources.IResource.References`[get]`

Number of current references, 0 means no references.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

ResourceType VisimBox.Resources.IResource.ResourceType`[get]`

Generic type of the resource.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.IndexBuffer, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, VisimBox.Renderer.VertexBuffer, VisimBox.Resources.Resource< T >, VisimBox.Resources.GenericResource, and VisimBox.Resources.StringTableResource.

ResourceUsage VisimBox.Resources.IResource.Usage`[get]`

Type of the resource usage (static/dynamic)

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimBox.Renderer.Light, VisimBox.Renderer.RenderMaterial, VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Renderer.Texture, and VisimBox.Resources.Resource< T >.

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

- ResourceManagers.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events