MWCAnimator.h

Classes

MWCAnimator -- Animator for MultiWCHolder class. (full description)

class MWCAnimator

Interface

Public Members
MWCAnimator()
MWCAnimator(MultiWCHolder &mholder)
virtual ~MWCAnimator()
virtual void addMWCHolder(MultiWCHolder &mholder)
virtual void removeMWCHolder(MultiWCHolder &mholder)
virtual void removeMWCHolders()
virtual void setLinearRestrictions(AttributeBuffer &restrictions, const AttributeBuffer &increments)
template <class T> void setLinearRestriction(const T &name, const T &value, const T &increment, const T& tol)
virtual void setLinearRestriction(const RecordInterface &rec)
virtual void removeRestriction(const String& name)
Private Members
const Bool isAlreadyRegistered(const MultiWCHolder &holder)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Synopsis

Motivation

To Do

Member Description

MWCAnimator()

Constructor which makes an isolated MWCAnimator.

MWCAnimator(MultiWCHolder &mholder)

Constructor which makes a MWCAnimator which is connected to the specified MultiWCHolder.

virtual ~MWCAnimator()

Destructor.

virtual void addMWCHolder(MultiWCHolder &mholder)
virtual void removeMWCHolder(MultiWCHolder &mholder)
virtual void removeMWCHolders()

Add or remove a MultiWCHolder, or remove all MultiWCHolders from this MWCAnimator. mholder is added at the end of the list.

virtual void setLinearRestrictions(AttributeBuffer &restrictions, const AttributeBuffer &increments)

Install the given restriction, spaced by the given increment, on all MultiWCHolders. Ultimately this will go private and be called (for example) by next(), prev(). But for now we leave it public for testing purposes. After being called, restrictions is the set of restrictions which have been placed on the final WorldCanvasHolder of the final MultiWCHolder in the list.

template <class T> void setLinearRestriction(const T &name, const T &value, const T &increment, const T& tol)

Install a restriction of the given name, and initial value and increment, on all MultiWCHolders. This is templated and the templates are valid for any type which can be added to an AttributeBuffer. This function simply sets up a single-element AttributeBuffer and calls setLinearRestrictions.

virtual void setLinearRestriction(const RecordInterface &rec)

Install a restriction described by the given RecordInterface, on all MultiWCHolders. This method simply extracts the fields name, value, and increment from rec, and calls the explicit version of setLinearRestriction. The value and increment fields can contain either Int, Float or Double data at the moment.

virtual void removeRestriction(const String& name)

Remove a restriction (including a 'linear' (ramped) one). (Can be (and is) used to remove 'bindex' restriction).

const Bool isAlreadyRegistered(const MultiWCHolder &holder)

Do we already have this MultiWCHolder registered?