C# Class OpenMetaverse.Inventory

Responsible for maintaining inventory structure. Inventory constructs nodes and manages node children as is necessary to maintain a coherant hirarchy. Other classes should not manipulate or create InventoryNodes explicitly. When A node's parent changes (when a folder is moved, for example) simply pass Inventory the updated InventoryFolder and it will make the appropriate changes to its internal representation.
Afficher le fichier Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Méthodes publiques

Méthode Description
Contains ( InventoryBase obj ) : bool
Contains ( UUID uuid ) : bool

Used to find out if Inventory contains the InventoryObject specified by uuid.

GetContents ( InventoryFolder folder ) : List
GetContents ( UUID folder ) : List

Returns the contents of the specified folder

GetNodeFor ( UUID uuid ) : InventoryNode
Inventory ( GridClient client, InventoryManager manager ) : System
Inventory ( GridClient client, InventoryManager manager, UUID owner ) : System
RemoveNodeFor ( InventoryBase item ) : void

Removes the InventoryObject and all related node data from Inventory.

UpdateNodeFor ( InventoryBase item ) : void

Updates the state of the InventoryNode and inventory data structure that is responsible for the InventoryObject. If the item was previously not added to inventory, it adds the item, and updates structure accordingly. If it was, it updates the InventoryNode, changing the parent node if item.parentUUID does not match node.Parent.Data.UUID. You can not set the inventory root folder using this method

this ( UUID uuid ) : InventoryBase

By using the bracket operator on this class, the program can get the InventoryObject designated by the specified uuid. If the value for the corresponding UUID is null, the call is equivelant to a call to RemoveNodeFor(this[uuid]). If the value is non-null, it is equivelant to a call to UpdateNodeFor(value), the uuid parameter is ignored.

Méthodes protégées

Méthode Description
FireOnInventoryObjectAdded ( InventoryBase obj ) : void
FireOnInventoryObjectRemoved ( InventoryBase obj ) : void
FireOnInventoryObjectUpdated ( InventoryBase oldObject, InventoryBase newObject ) : void

Method Details

Contains() public méthode

public Contains ( InventoryBase obj ) : bool
obj InventoryBase
Résultat bool

Contains() public méthode

Used to find out if Inventory contains the InventoryObject specified by uuid.
public Contains ( UUID uuid ) : bool
uuid UUID The UUID to check.
Résultat bool

FireOnInventoryObjectAdded() protected méthode

protected FireOnInventoryObjectAdded ( InventoryBase obj ) : void
obj InventoryBase
Résultat void

FireOnInventoryObjectRemoved() protected méthode

protected FireOnInventoryObjectRemoved ( InventoryBase obj ) : void
obj InventoryBase
Résultat void

FireOnInventoryObjectUpdated() protected méthode

protected FireOnInventoryObjectUpdated ( InventoryBase oldObject, InventoryBase newObject ) : void
oldObject InventoryBase
newObject InventoryBase
Résultat void

GetContents() public méthode

public GetContents ( InventoryFolder folder ) : List
folder InventoryFolder
Résultat List

GetContents() public méthode

Returns the contents of the specified folder
When folder does not exist in the inventory
public GetContents ( UUID folder ) : List
folder UUID A folder's UUID
Résultat List

GetNodeFor() public méthode

public GetNodeFor ( UUID uuid ) : InventoryNode
uuid UUID
Résultat InventoryNode

Inventory() public méthode

public Inventory ( GridClient client, InventoryManager manager ) : System
client GridClient
manager InventoryManager
Résultat System

Inventory() public méthode

public Inventory ( GridClient client, InventoryManager manager, UUID owner ) : System
client GridClient
manager InventoryManager
owner UUID
Résultat System

RemoveNodeFor() public méthode

Removes the InventoryObject and all related node data from Inventory.
public RemoveNodeFor ( InventoryBase item ) : void
item InventoryBase The InventoryObject to remove.
Résultat void

UpdateNodeFor() public méthode

Updates the state of the InventoryNode and inventory data structure that is responsible for the InventoryObject. If the item was previously not added to inventory, it adds the item, and updates structure accordingly. If it was, it updates the InventoryNode, changing the parent node if item.parentUUID does not match node.Parent.Data.UUID. You can not set the inventory root folder using this method
public UpdateNodeFor ( InventoryBase item ) : void
item InventoryBase The InventoryObject to store
Résultat void

this() public méthode

By using the bracket operator on this class, the program can get the InventoryObject designated by the specified uuid. If the value for the corresponding UUID is null, the call is equivelant to a call to RemoveNodeFor(this[uuid]). If the value is non-null, it is equivelant to a call to UpdateNodeFor(value), the uuid parameter is ignored.
public this ( UUID uuid ) : InventoryBase
uuid UUID The UUID of the InventoryObject to get or set, ignored if set to non-null value.
Résultat InventoryBase