OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
OpenSim.Region.Framework.Scenes.UuidGatherer Class Reference

Gather uuids for a given entity. More...

Inheritance diagram for OpenSim.Region.Framework.Scenes.UuidGatherer:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.Framework.Scenes.UuidGatherer:
Collaboration graph
[legend]

Public Member Functions

 UuidGatherer (IAssetService assetService)
 Initializes a new instance of the OpenSim.Region.Framework.Scenes.UuidGatherer class. More...
 
 UuidGatherer (IAssetService assetService, IDictionary< UUID, sbyte > collector)
 Initializes a new instance of the OpenSim.Region.Framework.Scenes.UuidGatherer class. More...
 
bool AddForInspection (UUID uuid)
 Adds the asset uuid for inspection during the gathering process. More...
 
void AddForInspection (SceneObjectGroup sceneObject)
 Gather all the asset uuids associated with a given object. More...
 
bool GatherNext ()
 Gathers the next set of assets returned by the next uuid to get from the asset service. More...
 
bool GatherAll ()
 Gathers all remaining asset UUIDS no matter how many calls are required to the asset service. More...
 

Protected Member Functions

virtual AssetBase GetAsset (UUID uuid)
 Get an asset synchronously, potentially using an asynchronous callback. If the asynchronous callback is used, we will wait for it to complete. More...
 

Protected Attributes

IAssetService m_assetService
 
Queue< UUID > m_assetUuidsToInspect
 

Properties

bool Complete [get]
 Is gathering complete? More...
 
IDictionary< UUID, sbyte > GatheredUuids [get, set]
 The dictionary of UUIDs gathered so far. If Complete == true then this is all the reachable UUIDs. More...
 
UUID NextUuidToInspect [get]
 Gets the next UUID to inspect. More...
 

Detailed Description

Gather uuids for a given entity.

This does a deep inspection of the entity to retrieve all the assets it uses (whether as textures, as scripts contained in inventory, as scripts contained in objects contained in another object's inventory, etc. Assets are only retrieved when they are necessary to carry out the inspection (i.e. a serialized object needs to be retrieved to work out which assets it references).

Definition at line 54 of file UuidGatherer.cs.

Constructor & Destructor Documentation

OpenSim.Region.Framework.Scenes.UuidGatherer.UuidGatherer ( IAssetService  assetService)
inline

Initializes a new instance of the OpenSim.Region.Framework.Scenes.UuidGatherer class.

In this case the collection of gathered assets will start out blank.

Parameters
assetServiceAsset service.

Definition at line 95 of file UuidGatherer.cs.

OpenSim.Region.Framework.Scenes.UuidGatherer.UuidGatherer ( IAssetService  assetService,
IDictionary< UUID, sbyte >  collector 
)
inline

Initializes a new instance of the OpenSim.Region.Framework.Scenes.UuidGatherer class.

Parameters
assetServiceAsset service.
collectorGathered UUIDs will be collected in this dictinaory. It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected.

Definition at line 107 of file UuidGatherer.cs.

Member Function Documentation

bool OpenSim.Region.Framework.Scenes.UuidGatherer.AddForInspection ( UUID  uuid)
inline

Adds the asset uuid for inspection during the gathering process.

Returns
true, if for inspection was added, false otherwise.
Parameters
uuidUUID.

Definition at line 121 of file UuidGatherer.cs.

void OpenSim.Region.Framework.Scenes.UuidGatherer.AddForInspection ( SceneObjectGroup  sceneObject)
inline

Gather all the asset uuids associated with a given object.

This includes both those directly associated with it (e.g. face textures) and recursively, those of items within it's inventory (e.g. objects contained within this object).

Parameters
sceneObjectThe scene object for which to gather assets

Definition at line 141 of file UuidGatherer.cs.

Here is the call graph for this function:

bool OpenSim.Region.Framework.Scenes.UuidGatherer.GatherAll ( )
inline

Gathers all remaining asset UUIDS no matter how many calls are required to the asset service.

Returns
false if gathering is already complete, true otherwise

Definition at line 255 of file UuidGatherer.cs.

bool OpenSim.Region.Framework.Scenes.UuidGatherer.GatherNext ( )
inline

Gathers the next set of assets returned by the next uuid to get from the asset service.

Returns
false if gathering is already complete, true otherwise

Definition at line 237 of file UuidGatherer.cs.

virtual AssetBase OpenSim.Region.Framework.Scenes.UuidGatherer.GetAsset ( UUID  uuid)
inlineprotectedvirtual

Get an asset synchronously, potentially using an asynchronous callback. If the asynchronous callback is used, we will wait for it to complete.

Parameters
uuid
Returns

Reimplemented in OpenSim.Region.Framework.Scenes.HGUuidGatherer.

Definition at line 438 of file UuidGatherer.cs.

Member Data Documentation

IAssetService OpenSim.Region.Framework.Scenes.UuidGatherer.m_assetService
protected

Definition at line 84 of file UuidGatherer.cs.

Queue<UUID> OpenSim.Region.Framework.Scenes.UuidGatherer.m_assetUuidsToInspect
protected

Definition at line 86 of file UuidGatherer.cs.

Property Documentation

bool OpenSim.Region.Framework.Scenes.UuidGatherer.Complete
get

Is gathering complete?

Definition at line 61 of file UuidGatherer.cs.

IDictionary<UUID, sbyte> OpenSim.Region.Framework.Scenes.UuidGatherer.GatheredUuids
getset

The dictionary of UUIDs gathered so far. If Complete == true then this is all the reachable UUIDs.

The gathered uuids.

Definition at line 67 of file UuidGatherer.cs.

UUID OpenSim.Region.Framework.Scenes.UuidGatherer.NextUuidToInspect
get

Gets the next UUID to inspect.

If there is no next UUID then returns null

Definition at line 74 of file UuidGatherer.cs.


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