Lumiverse  2.5
A framework for creating lighting control applications
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Lumiverse::ShowControl::Snapshot Class Reference

A Snapshot stores the state of the Rig at a particular time. More...

#include <Snapshot.h>

Inheritance diagram for Lumiverse::ShowControl::Snapshot:
Inheritance graph
[legend]

Public Member Functions

 Snapshot (Rig *rig)
 
 Snapshot (Snapshot &other)
 
void saveSnapshot (Rig *rig)
 Saves a snapshot of the given Rig and Playback objects. More...
 
void loadSnapshot (Rig *targetRig)
 Loads the stored snapshot values into the given Rig and Playback objects. More...
 
void loadRig (Rig *targetRig)
 Loads the stored rig state into the given Rig. More...
 
map< string, Device * > & getRigData ()
 Retrieves device data from the snapshot.
 
set< Device * > getDevices ()
 Returns an unindexed set of the devices from the snapshot.
 

Public Attributes

map< string, string > _metadata
 Arbitrary use metadata map for a snapshot object.
 

Protected Attributes

map< string, Device * > m_rigData
 Stores the device data from the rig.
 

Detailed Description

A Snapshot stores the state of the Rig at a particular time.

Snapshots will only store the rig. To also save the Playback, use the PlaybackSnapshot class instead.

Snapshots do not store state information about the rig's update loop, patches, or attached functions. Snapshots operate purely on the state of the devices at a particular time.

Member Function Documentation

void Lumiverse::ShowControl::Snapshot::loadRig ( Rig targetRig)

Loads the stored rig state into the given Rig.

Parameters
targetRigRig to load the snapshot into.
void Lumiverse::ShowControl::Snapshot::loadSnapshot ( Rig targetRig)

Loads the stored snapshot values into the given Rig and Playback objects.

This function will stop the update loop from running in the Playback object, as running it during large data ops is generally a bad idea. It will restore the loop to the previou state after loading all values. This does mean that all cue playbacks will also stop and be reset on load.

Parameters
targetRigRig to load the snapshot into.
void Lumiverse::ShowControl::Snapshot::saveSnapshot ( Rig rig)

Saves a snapshot of the given Rig and Playback objects.

Parameters
rigSource rig

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