v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::AssetConfiguration< tCapacity > Class Template Reference

An AssetConfiguration represents an arrangement of AssetGroups to load. More...

#include <sifteo/asset/loader.h>

Inherits Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t >.

Public Member Functions

void append (_SYSAssetSlot slot, AssetGroup &group, _SYSVolumeHandle volume=0)
 Add an AssetGroup to this configuration. More...
 
- Public Member Functions inherited from Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t >
AssetConfigurationNodeappend (const AssetConfigurationNode &newItem)
 Synonym for push_back()
 
AssetConfigurationNodeappend ()
 Synonym for push_back()
 
 Array ()
 Initialize a new empty array.
 
iterator begin ()
 Return an iterator pointing to the first slot in the array.
 
void clear ()
 Equivalent to setCount(0)
 
unsigned count () const
 How many items does this array currently hold?
 
bool empty () const
 Is this array empty?
 
iterator end ()
 Return an iterator pointing just past the last in-use slot in the array.
 
void erase (unsigned index)
 Remove a specific element, by index, and shift the others down.
 
void erase (iterator item)
 Remove the element at iterator 'item' and shift the others down.
 
void erase_tail ()
 Remove the last element, which involves no shifting.
 
unsigned find (AssetConfigurationNodeitemToFind)
 
const AssetConfigurationNodeoperator[] (unsigned index) const
 Accessor for array elements.
 
const AssetConfigurationNodeoperator[] (int index) const
 Accessor for array elements.
 
AssetConfigurationNodeoperator[] (unsigned index)
 Accessor for array elements.
 
AssetConfigurationNodeoperator[] (int index)
 Accessor for array elements.
 
AssetConfigurationNode pop_back ()
 Deallocate the last element and return a copy of it's value.
 
void pop_back (AssetConfigurationNode *outValue)
 Pop-back, but avoid a potential unnecessary copy.
 
AssetConfigurationNodepush_back (const AssetConfigurationNode &newItem)
 Copy 'newItem' to the first unused slot in the array, and return a reference to the copy.
 
AssetConfigurationNodepush_back ()
 Allocate the first unused slot in the array, and return an reference to this uninitialized slot.
 
void setCount (unsigned c)
 Change the number of elements currently in the array. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t >
static unsigned capacity ()
 Retrieve the capacity of this array, always constant at compile-time.
 

Detailed Description

template<unsigned tCapacity>
class Sifteo::AssetConfiguration< tCapacity >

An AssetConfiguration represents an arrangement of AssetGroups to load.

This object provides instructions to an AssetLoader about which AssetGroups to load into which slots. A single AssetConfiguration may be applied to all cubes, or different AssetConfigurations may be used for different subsets of cubes during a single load event.

An AssetConfiguration is stored as an array of nodes, each of which associates an AssetGroup with an AssetSlot. The AssetLoader is responsible for making this entire configuration current on the cube, even if this requires erasing AssetSlots, and even if new cubes arrive partway through the loading process.

Member Function Documentation

template<unsigned tCapacity>
void Sifteo::AssetConfiguration< tCapacity >::append ( _SYSAssetSlot  slot,
AssetGroup group,
_SYSVolumeHandle  volume = 0 
)
inline

Add an AssetGroup to this configuration.

This appends a new load instruction to the AssetConfiguration, instructing the AssetLoader to make sure the AssetGroup 'group' is available in the AssetSlot 'slot' by the time the load finishes.

If the AssetGroup is part of a different Volume, you must provide that volume handle as the 'volume' parameter, and the 'group' must be mapped via MappedVolume. If you are loading assets packaged with your own game, you do not need to provide a volume.


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