Open Lighting Architecture  0.9.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::UniverseStore Class Reference

Detailed Description

Maintains a collection of Universe objects.

Public Member Functions

 UniverseStore (class Preferences *preferences, class ExportMap *export_map)
 Create a new UniverseStore.
 ~UniverseStore ()
 Destructor.
UniverseGetUniverse (unsigned int universe_id) const
 Lookup a universe from its universe-id.
UniverseGetUniverseOrCreate (unsigned int universe_id)
 Lookup a universe, or create it if it does not exist.
unsigned int UniverseCount () const
 Return the number of universes.
void GetList (std::vector< Universe * > *universes) const
 Returns a list of universes. This must be freed when you're done with it.
void DeleteAll ()
 Delete all universes.
void AddUniverseGarbageCollection (Universe *universe)
 Mark a universe as a candiate for garbage collection.
void GarbageCollectUniverses ()
 Garbage collect any pending universes.

Constructor & Destructor Documentation

ola::UniverseStore::UniverseStore ( class Preferences preferences,
class ExportMap export_map 
)

Create a new UniverseStore.

Parameters
preferencesThe Preferences store.
export_mapthe ExportMap to use for stats, may be NULL.

Member Function Documentation

void ola::UniverseStore::AddUniverseGarbageCollection ( Universe universe)

Mark a universe as a candiate for garbage collection.

Parameters
universethe Universe which has no clients or ports bound.
void ola::UniverseStore::GetList ( std::vector< Universe * > *  universes) const

Returns a list of universes. This must be freed when you're done with it.

Parameters
[out]universesa pointer to a vector of Universes.
Universe * ola::UniverseStore::GetUniverse ( unsigned int  universe_id) const

Lookup a universe from its universe-id.

Parameters
universe_idthe universe-id of the universe.
Returns
the universe, or NULL if the universe doesn't exist.
Universe * ola::UniverseStore::GetUniverseOrCreate ( unsigned int  universe_id)

Lookup a universe, or create it if it does not exist.

Parameters
universe_idthe universe-id of the universe.
Returns
the universe, or NULL on error

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