ASPiK SDK
VSTGUI::IDependency Class Reference

simple dependency between objects. More...

#include <idependency.h>

Inheritance diagram for VSTGUI::IDependency:
VSTGUI::CColorChooser VSTGUI::CControl VSTGUI::DependentObject VSTGUI::TestObject VSTGUI::UIDescription Mandelbrot::ProgressIndicatorView VSTGUI::CAutoAnimation VSTGUI::CCheckBox VSTGUI::CKickButton VSTGUI::CKnob VSTGUI::CMovieBitmap VSTGUI::CMovieButton VSTGUI::COnOffButton VSTGUI::CParamDisplay VSTGUI::CRockerSwitch VSTGUI::CScrollbar VSTGUI::CSegmentButton VSTGUI::CSlider VSTGUI::CSpecialDigit VSTGUI::CSplashScreen VSTGUI::CSwitchBase VSTGUI::CTextButton VSTGUI::CVuMeter VSTGUI::LineStyleTestView VSTGUI::SpectrumView VSTGUI::WaveView VSTGUI::CompressedUIDescription

Classes

class  DeferChanges
 

Public Member Functions

virtual void addDependency (CBaseObject *obj)
 
virtual void removeDependency (CBaseObject *obj)
 
virtual void changed (IdStringPtr message)
 
virtual void deferChanges (bool state)
 

Protected Types

using DeferedChangesSet = std::set< IdStringPtr >
 
using DependentList = std::list< CBaseObject * >
 

Static Protected Member Functions

static void rememberObject (CBaseObject *obj)
 
static void forgetObject (CBaseObject *obj)
 

Protected Attributes

int32_t deferChangeCount {0}
 
DeferedChangesSet deferedChanges
 
DependentList dependents
 

Detailed Description

simple dependency between objects.

You can inject this implementation into CBaseObjects whenever you need other CBaseObjects to be informed about changes to that class instance. Note that you need to handle recursions yourself and that no reference counting is done and that you must make sure that the dependent objects are alife while added as dependent.

Member Function Documentation

◆ addDependency()

void VSTGUI::IDependency::addDependency ( CBaseObject obj)
inlinevirtual

add a dependent object

◆ changed()

void VSTGUI::IDependency::changed ( IdStringPtr  message)
inlinevirtual

notify dependent objects of change with message.

◆ deferChanges()

void VSTGUI::IDependency::deferChanges ( bool  state)
inlinevirtual

defer changes until later. can be nested. If you use this, you must make sure that all message pointers are valid the whole time.

◆ removeDependency()

void VSTGUI::IDependency::removeDependency ( CBaseObject obj)
inlinevirtual

remove a dependent object.


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