|
| LM_COMPONENT_IMPL_DEF ("stub") |
|
virtual bool | Load (const ConfigNode &node) |
|
virtual Asset * | GetAssetByName (const std::string &name) const |
|
virtual boost::signals2::connection | Connect_ReportProgress (const std::function< void(double, bool) > &func) |
|
virtual bool | RegisterInterface (const std::string &interfaceName, const std::string &interfaceGroupName, const std::vector< std::string > &dependencies) |
|
void | Add (const std::string &id, Asset *asset) |
|
| LM_COMPONENT_INTERFACE_DEF ("assets") |
|
virtual boost::signals2::connection | Connect_ReportProgress (const std::function< void(double, bool)> &func)=0 |
|
template<typename AssetInterfaceType > |
bool | RegisterInterface () |
|
LM_PUBLIC_API Asset * | ResolveReferenceToAsset (const ConfigNode &node, const std::string &type) const |
|
template<typename AssetInterfaceType > |
AssetInterfaceType * | ResolveReferenceToAsset (const ConfigNode &node) const |
|
template<typename AssetInterfaceType > |
LM_NAMESPACE_BEGIN bool | RegisterInterface () |
|
virtual std::string | ComponentInterfaceTypeName () const =0 |
|
virtual std::string | ComponentImplTypeName () const =0 |
|
void * | operator new (std::size_t size) throw (std::bad_alloc) |
|
void | operator delete (void *p) |
|
|
boost::unordered_map
< std::string, std::unique_ptr
< Asset > > | assetInstanceMap |
|
virtual Asset* StubAssets::GetAssetByName |
( |
const std::string & |
name | ) |
const |
|
inlinevirtual |
Get an asset by name. Returns nullptr if not found.
- Parameters
-
- Returns
- Asset instance.
Implements Assets.
virtual bool StubAssets::Load |
( |
const ConfigNode & |
node | ) |
|
|
inlinevirtual |
Load assets from XML element. Parse the element #node and register assets.
- Parameters
-
node | A XML element which consists of the assets element. |
- Return values
-
true | Succeeded to load assets. |
false | Failed to load assets. |
Implements Assets.
virtual bool StubAssets::RegisterInterface |
( |
const std::string & |
interfaceName, |
|
|
const std::string & |
interfaceGroupName, |
|
|
const std::vector< std::string > & |
dependencies |
|
) |
| |
|
inlinevirtual |
Register an interface for assets. Register an component interface class for assets creation. The class must inherit Assets and specify dependencies to the other asset types with LM_ASSET_DEPENDENCIES macro. Fails if the factory with same name is already registered.
- Parameters
-
interfaceName | Name of component interface class which is inherited from Asset. |
interfaceGroupName | Name of interface group. e.g. triangle_meshes for triangle_mesh type. |
dependencies | Dependent asset interface names. |
- Return values
-
true | Succeeded to register. |
false | Failed to register. |
- See also
- LM_ASSET_DEPENDENCIES
Implements Assets.
The documentation for this class was generated from the following file:
- /home/travis/build/hi2p-perim/lightmetrica/include/lightmetrica.test/stub.assets.h