# Class AssetManager

Class AssetManager

Facade for the Asset subsystem

Declaration :

- C++ : class AssetManager

Artifact : assetmanager

Stereotype: boundary

Operation getID

Declaration :

- Uml : static, + getID(in idi : Asset) :
- C++ : public: static getID ()

Operation getAsset

find and return corresponging object

Declaration :

- Uml : + getAsset(in id : long) : KIND, exceptions : Invalid
- C++ : public: template<class KIND> KIND getAsset (long & id) throw (Invalid)

Operation known

@return true if the given id is registered in the internal asset DB

Declaration :

- Uml : + known(in id : long) : bool
- C++ : public: bool known (long id)

Operation remove

remove the given asset <i>together with all its dependants</i> from the internal DB

Declaration :

- Uml : + remove(in id : long) : void, exceptions : Invalid, State
- C++ : public: void remove (long id) throw (Invalid, State)

Operation reg

registers an asset object in the internal DB, providing its unique key

Declaration :

- Uml : static, # reg(inout name : string, inout category : string, inout org : string, inout uint : version) : long, exceptions : Invalid
- C++ : protected: static long reg (string & name, string & category, string & org, version& uint) throw (Invalid)

Relation registry (<unidirectional association>)

@internal Table or DB holding all registered asset instances.

Declaration :

- Uml : # registry : DB, multiplicity : 1
- C++ : protected: DB* registry

All public operations : getAsset , getID , known , remove