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
VisimBox.Resources.IResourceConsumer Interface Reference

Interface for resource consumers - resource will call all of it's registered consumers on some events. More...

Inheritance diagram for VisimBox.Resources.IResourceConsumer:

List of all members.

## Public Member Functions
void | ResourceDisposing (IResource resource)
| Callback for resource disposing - just before releasing itself from memory resource will call all it's consumers to notify them it will be no longer valid.
bool | ResourceReplaced (IResource original, IResource newresource)
| Resource was replaced by another resource. Consumers can decide to keep new resource instead or hold to original value. If consumers wants to hold new resource instead, it should change it's pointers and return true, references in resources will be automatically updated. If false, consumer is not interested in new resource - depending on the nature of replace it may then get ResourceDisposing callback.

## Detailed Description

Interface for resource consumers - resource will call all of it's registered consumers on some events.

## Member Function Documentation

void VisimBox.Resources.IResourceConsumer.ResourceDisposing | ( | IResource | resource | ) |

Callback for resource disposing - just before releasing itself from memory resource will call all it's consumers to notify them it will be no longer valid.

Parameters:

  resource | Resource which is being disposed

Implemented in VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Resources.AbstractResMan< T >, VisimRenderGL.GLMaterialSimpleTex, and VisimRenderGL.GLMaterialColoredTex.

bool VisimBox.Resources.IResourceConsumer.ResourceReplaced | ( | IResource | original,
|  | IResource | newresource
| ) |  |

Resource was replaced by another resource. Consumers can decide to keep new resource instead or hold to original value. If consumers wants to hold new resource instead, it should change it's pointers and return true, references in resources will be automatically updated. If false, consumer is not interested in new resource - depending on the nature of replace it may then get ResourceDisposing callback.

Parameters:

  original | Original resource registered with consumer
  newresource | New resource

Returns:
  Consumer must return true if it want's to change reference to newresource, otherwise false.

Implemented in VisimBox.Renderer.Render2D.Font, VisimBox.Renderer.RenderObjects.Mesh, VisimBox.Resources.AbstractResMan< T >, VisimRenderGL.GLMaterialSimpleTex, and VisimRenderGL.GLMaterialColoredTex.

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

- ResourceManagers.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events