C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
FireOnInventoryObjectAdded ( InventoryBase obj ) : void
FireOnInventoryObjectRemoved ( InventoryBase obj ) : void
FireOnInventoryObjectUpdated ( InventoryBase oldObject, InventoryBase newObject ) : void

Описание методов

Contains() публичный Метод

public Contains ( InventoryBase obj ) : bool
obj InventoryBase
Результат bool

Contains() публичный Метод

Used to find out if Inventory contains the InventoryObject specified by uuid.
public Contains ( UUID uuid ) : bool
uuid UUID The UUID to check.
Результат bool

FireOnInventoryObjectAdded() защищенный Метод

protected FireOnInventoryObjectAdded ( InventoryBase obj ) : void
obj InventoryBase
Результат void

FireOnInventoryObjectRemoved() защищенный Метод

protected FireOnInventoryObjectRemoved ( InventoryBase obj ) : void
obj InventoryBase
Результат void

FireOnInventoryObjectUpdated() защищенный Метод

protected FireOnInventoryObjectUpdated ( InventoryBase oldObject, InventoryBase newObject ) : void
oldObject InventoryBase
newObject InventoryBase
Результат void

GetContents() публичный Метод

public GetContents ( InventoryFolder folder ) : List
folder InventoryFolder
Результат List

GetContents() публичный Метод

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
Результат List

GetNodeFor() публичный Метод

public GetNodeFor ( UUID uuid ) : InventoryNode
uuid UUID
Результат InventoryNode

Inventory() публичный Метод

public Inventory ( GridClient client, InventoryManager manager ) : System
client GridClient
manager InventoryManager
Результат System

Inventory() публичный Метод

public Inventory ( GridClient client, InventoryManager manager, UUID owner ) : System
client GridClient
manager InventoryManager
owner UUID
Результат System

RemoveNodeFor() публичный Метод

Removes the InventoryObject and all related node data from Inventory.
public RemoveNodeFor ( InventoryBase item ) : void
item InventoryBase The InventoryObject to remove.
Результат void

UpdateNodeFor() публичный Метод

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
Результат void

this() публичный Метод

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.
Результат InventoryBase