VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
IDependency Class Reference
New classes » Version 4.0

simple dependency between objects. More...

`#include <idependency.h>`

## Classes
class | DeferChanges
| helper class to defer changes until instance is destroyed. More...

## Public Member Functions
virtual void | addDependency (CBaseObject *obj)
| add a dependent object More...
virtual void | removeDependency (CBaseObject *obj)
| remove a dependent object. More...
virtual void | changed (IdStringPtr message)
| notify dependent objects of change with message. More...
virtual void | deferChanges (bool state)
| defer changes until later. More...

## Protected Types
using | DeferedChangesSet = std::set< IdStringPtr >
using | DependentList = std::list< CBaseObject * >

## Protected Member Functions
| IDependency ()=default
virtual | ~IDependency () noexcept

## 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 Typedef Documentation

## ◆ DeferedChangesSet

using DeferedChangesSet = std::set<IdStringPtr>
| protected

## ◆ DependentList

using DependentList = std::list<CBaseObject*>
| protected

## Constructor & Destructor Documentation

## ◆ IDependency()

IDependency | ( |  | ) |
| protected default

## ◆ ~IDependency()

~IDependency | ( |  | ) |
| inline protected virtual noexcept

## Member Function Documentation

## ◆ addDependency()

void addDependency | ( | CBaseObject * | obj | ) |
| inline virtual

add a dependent object

## ◆ changed()

void changed | ( | IdStringPtr | message | ) |
| inline virtual

notify dependent objects of change with message.

## ◆ deferChanges()

void deferChanges | ( | bool | state | ) |
| inline virtual

defer changes until later.

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

## ◆ forgetObject()

static void forgetObject | ( | CBaseObject * | obj | ) |
| inline static protected

## ◆ rememberObject()

static void rememberObject | ( | CBaseObject * | obj | ) |
| inline static protected

## ◆ removeDependency()

void removeDependency | ( | CBaseObject * | obj | ) |
| inline virtual

remove a dependent object.

## Member Data Documentation

## ◆ deferChangeCount

int32_t deferChangeCount {0}
| protected

## ◆ deferedChanges

DeferedChangesSet deferedChanges
| protected

## ◆ dependents

DependentList dependents
| protected

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

- idependency.h