This is a class that stores a specific grouping of Assets, usually based on thier location. More...
#include <assetgroup.h>
Public Types | |
typedef std::map< String, DataStreamPtr > | AssetContainer |
Container class for storing DataStream instances in this class. | |
typedef AssetContainer::iterator | AssetIterator |
Iterator type for DataStream instances stored in this class. | |
typedef AssetContainer::const_iterator | ConstAssetIterator |
Const Iterator type for DataStream instances stored in this class. | |
typedef UnnamedAssetContainer::const_iterator | ConstUnnamedAssetIterator |
Const Iterator type for DataStream instances stored by this class. | |
typedef std::vector< Resource::DataStreamPtr > | UnnamedAssetContainer |
Basic container type for DataStream storage by this class. | |
typedef UnnamedAssetContainer::iterator | UnnamedAssetIterator |
Iterator type for DataStream instances stored by this class. | |
Public Member Functions | |
AssetGroup (const String &GroupName) | |
Class constructor. More... | |
~AssetGroup () | |
Class destructor. | |
Resource::DataStreamPtr | CreateDataStream (void *Buffer, const UInt32 BufferSize) |
Creates a stream from a memory buffer. More... | |
Resource::DataStreamPtr | CreateDataStream (const String &AssetName, void *Buffer, const UInt32 BufferSize) |
Creates a named stream from a memory buffer. More... | |
const String & | GetName () const |
Gets the name of this asset group. More... | |
void | InitializeAssets () |
Prepares some Assets for use within this group. More... | |
Resource::DataStreamPtr | OpenAssetStream (const String &AssetName) |
Opens a stream to an asset in an AssetGroup. More... | |
Protected Attributes | |
AssetContainer | GroupAssets |
Container storing all of the named open streams belonging to this group. More... | |
String | Name |
The name of this group. More... | |
UnnamedAssetContainer | UnnamedGroupAssets |
Container storing all of the unnamed open streams bleonging to this group. More... | |
This is a class that stores a specific grouping of Assets, usually based on thier location.
Definition at line 53 of file assetgroup.h.
Mezzanine::Resource::AssetGroup::AssetGroup | ( | const String & | GroupName | ) |
Class constructor.
GroupName | The name to be given to this group. |
Definition at line 53 of file assetgroup.cpp.
Resource::DataStreamPtr Mezzanine::Resource::AssetGroup::CreateDataStream | ( | void * | Buffer, |
const UInt32 | BufferSize | ||
) |
Creates a stream from a memory buffer.
Buffer | A pointer to the memory to stream from. |
BufferSize | The size of the provided buffer in bytes. |
Definition at line 97 of file assetgroup.cpp.
Resource::DataStreamPtr Mezzanine::Resource::AssetGroup::CreateDataStream | ( | const String & | AssetName, |
void * | Buffer, | ||
const UInt32 | BufferSize | ||
) |
Creates a named stream from a memory buffer.
AssetName | The name to be given to the created stream. |
Buffer | A pointer to the memory to stream from. |
BufferSize | The size of the provided buffer in bytes. |
Definition at line 104 of file assetgroup.cpp.
const String & Mezzanine::Resource::AssetGroup::GetName | ( | ) | const |
Gets the name of this asset group.
Definition at line 67 of file assetgroup.cpp.
void Mezzanine::Resource::AssetGroup::InitializeAssets | ( | ) |
Prepares some Assets for use within this group.
After adding all of your assets and declaring them as nessessary, this function is the final step. After calling this function any and all assets within the defined group will be ready to use. Do not initialize any more groups then you need to however, as that will take up memory and drop performance.
Definition at line 72 of file assetgroup.cpp.
Resource::DataStreamPtr Mezzanine::Resource::AssetGroup::OpenAssetStream | ( | const String & | AssetName | ) |
Opens a stream to an asset in an AssetGroup.
AssetName | The identity of the asset to be opened (commonly a file name). |
Definition at line 80 of file assetgroup.cpp.
|
protected |
Container storing all of the named open streams belonging to this group.
Definition at line 74 of file assetgroup.h.
|
protected |
The name of this group.
Definition at line 77 of file assetgroup.h.
|
protected |
Container storing all of the unnamed open streams bleonging to this group.
Definition at line 71 of file assetgroup.h.