Open Lighting Architecture: ola::UniverseStore Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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.
Universe * | GetUniverse (unsigned int universe_id) const
| Lookup a universe from its universe-id.
Universe * | GetUniverseOrCreate (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 candidate for garbage collection.
void | GarbageCollectUniverses ()
| Garbage collect any pending universes.

## Constructor & Destructor Documentation

## ◆ UniverseStore()

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

Create a new UniverseStore.

Parameters

  preferences | The Preferences store.
  export_map | the ExportMap to use for stats, may be NULL.

## Member Function Documentation

## ◆ AddUniverseGarbageCollection()

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

Mark a universe as a candidate for garbage collection.

Parameters

  universe | the Universe which has no clients or ports bound.

## ◆ GetList()

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] | universes | a pointer to a vector of Universes.

## ◆ GetUniverse()

Universe * ola::UniverseStore::GetUniverse | ( | unsigned int | universe_id | ) | const

Lookup a universe from its universe-id.

Parameters

  universe_id | the universe-id of the universe.

Returns
  the universe, or NULL if the universe doesn't exist.

## ◆ GetUniverseOrCreate()

Universe * ola::UniverseStore::GetUniverseOrCreate | ( | unsigned int | universe_id | ) |

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

Parameters

  universe_id | the universe-id of the universe.

Returns
  the universe, or NULL on error

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

- olad/plugin_api/UniverseStore.h
- olad/plugin_api/UniverseStore.cpp