Jamba C++ API  5.1.1
FObjectCx Class Reference

Wrapper class which maintains a connection between the target and this object. More...

#include <FObjectCx.h>

Inherits FObject.

Inherited by FObjectCxCallback, and GUIParamCx.

Public Member Functions

virtual void close ()
 Call to stop listening for changes. More...
 
 FObjectCx (FObject *iTarget)
 
 FObjectCx (FObjectCx const &)=delete
 
virtual void onTargetChange ()
 Called when the target changes (by default does nothing) More...
 
FObjectCxoperator= (FObjectCx const &)=delete
 
 ~FObjectCx () override
 Automatically closes the connection and stops listening. More...
 

Protected Member Functions

void PLUGIN_API update (FUnknown *iChangedUnknown, Steinberg::int32 iMessage) SMTG_OVERRIDE
 This is being called when fTarget sends a message to this object. More...
 

Protected Attributes

bool fIsConnected
 
FObject * fTarget
 

Detailed Description

Wrapper class which maintains a connection between the target and this object.

The connection will be terminated if close() is called or automatically when the destructor is called. The main point of this class is to turn FObject.addRef/addDependent into an RAII concept (Resource Acquisition Is Initialization).

Constructor & Destructor Documentation

◆ FObjectCx() [1/2]

FObjectCx ( FObject *  iTarget)
explicit

◆ ~FObjectCx()

~FObjectCx ( )
inlineoverride

Automatically closes the connection and stops listening.

◆ FObjectCx() [2/2]

FObjectCx ( FObjectCx const &  )
delete

Member Function Documentation

◆ close()

void close ( )
virtual

Call to stop listening for changes.

Also called automatically from the destructor.

Reimplemented in FObjectCxCallback, and GUIParamCx.

◆ onTargetChange()

virtual void onTargetChange ( )
inlinevirtual

Called when the target changes (by default does nothing)

Reimplemented in FObjectCxCallback, and GUIParamCx.

◆ operator=()

FObjectCx& operator= ( FObjectCx const &  )
delete

◆ update()

void update ( FUnknown *  iChangedUnknown,
Steinberg::int32  iMessage 
)
protected

This is being called when fTarget sends a message to this object.

Member Data Documentation

◆ fIsConnected

bool fIsConnected
protected

◆ fTarget

FObject* fTarget
protected

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