FPLBase
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fplbase::FileAsset Class Reference

A generic asset whose contents the AssetManager doesn't care about. More...

#include <asset_manager.h>

Inheritance diagram for fplbase::FileAsset:
fplbase::AsyncAsset fplbase::Asset

Detailed Description

A generic asset whose contents the AssetManager doesn't care about.

Public Attributes

std::string contents
 

Additional Inherited Members

- Public Types inherited from fplbase::AsyncAsset
typedef std::function< void()> AssetFinalizedCallback
 A function pointer to an asset loaded callback function.
 
- Public Member Functions inherited from fplbase::AsyncAsset
 AsyncAsset ()
 Default constructor for an empty AsyncAsset.
 
 AsyncAsset (const char *filename)
 Construct an AsyncAsset with a given file name. More...
 
virtual ~AsyncAsset ()
 AsyncAsset destructor.
 
bool LoadNow ()
 Performs a synchronous load by calling Load & Finalize. More...
 
void set_filename (const std::string &filename)
 Sets the filename that should be loaded. More...
 
const std::string & filename () const
 The name of the file associated with the resource. More...
 
void AddFinalizeCallback (AssetFinalizedCallback callback)
 Adds a callback to be called when the asset is finalized. More...
 
- Public Member Functions inherited from fplbase::Asset
void IncreaseRefCount ()
 indicate there is an additional owner of this asset. By default, when you call any of the UnLoad*() functions in the AssetManager, that will directly delete the asset since they all start out with a single reference count. Call this function to indicate multiple owners will call Unload*() independently, and only have the asset deleted by the last one.
 
- Protected Member Functions inherited from fplbase::AsyncAsset
void CallFinalizeCallback ()
 Calls app callbacks when an asset is ready to be used. More...
 
- Protected Attributes inherited from fplbase::AsyncAsset
std::string filename_
 The resource file name.
 
const uint8_t * data_
 The resource data.
 
std::vector
< AssetFinalizedCallback
finalize_callbacks_
 

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