Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Member Functions | List of all members
hdi::core::Notifier Class Reference

Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks. More...

#include <hdicoreNotifier.h>

Public Member Functions

 Notifier ()
 Constructs an empty Notifier object. More...
 
 Notifier (const Notifier &n_)
 Constructs a new Notifier object from an existing Notifier object (copy constructor) More...
 
 Notifier (const NotifierType type_, const Callback &responder_)
 Constructs a Notifier object to fire a responder (target and action) when Illustrator sends a notification. More...
 
virtual ~Notifier ()
 Destructs a Notifier object, deactivating it first. More...
 
virtual Notifieroperator= (const Notifier &rhs_)
 Assigns one Notifier object to another. More...
 
virtual bool operator== (const Notifier &rhs_) const
 Tests whether a given Notifier object is the same as another. More...
 
virtual bool operator!= (const Notifier &rhs_) const
 Tests whether a given Notifier object is not the same as another. More...
 
virtual bool isEmpty () const
 Gets whether the target Notifier object is empty (constructed with the default ctor) More...
 
virtual NotifierType type () const
 Gets the type of the notifier. More...
 
virtual bool active () const
 Gets whether the notifier is active. More...
 
virtual void setActive (const bool active_)
 Sets whether the notifier is active. More...
 
virtual void activate () const
 Activates (enables) the notifier. More...
 
virtual void deactivate () const
 Deactivates (disables) the notifier. More...
 
virtual Callback *const callback () const
 Gets the registered callback for the notifier. More...
 
virtual void setCallback (const Callback &cb_)
 Sets the callback for the notifier. More...
 

Detailed Description

Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks.

Constructor & Destructor Documentation

hdi::core::Notifier::Notifier ( )

Constructs an empty Notifier object.

Author
GW
Date
08/2013
Note
To test if a Notifier object is empty, call isEmpty() on it
Empty Notifier objects do not relate to any Illustrator notifier; they are designed to be "receivers" of some other Notifier object via the overloaded assignment operator. Empty Notifier objects are useless until such time (though it is safe to call any of their methods).
hdi::core::Notifier::Notifier ( const Notifier n_)

Constructs a new Notifier object from an existing Notifier object (copy constructor)

Author
GW
Date
08/2013
Parameters
n_Existing Notifier object
hdi::core::Notifier::Notifier ( const NotifierType  type_,
const Callback responder_ 
)

Constructs a Notifier object to fire a responder (target and action) when Illustrator sends a notification.

Author
GW
Date
08/2013
Parameters
type_Type of notifier
responder_Target and action to fire
virtual hdi::core::Notifier::~Notifier ( )
virtual

Destructs a Notifier object, deactivating it first.

Author
GW
Date
08/2013

Member Function Documentation

virtual void hdi::core::Notifier::activate ( ) const
virtual

Activates (enables) the notifier.

Author
GW
Date
08/2013
virtual bool hdi::core::Notifier::active ( ) const
virtual

Gets whether the notifier is active.

Author
GW
Date
08/2013
Returns
true if the notifier is enabled, false otherwise
virtual Callback* const hdi::core::Notifier::callback ( ) const
virtual

Gets the registered callback for the notifier.

Author
GW
Date
08/2013
Returns
Currently registered notifier callback
virtual void hdi::core::Notifier::deactivate ( ) const
virtual

Deactivates (disables) the notifier.

Author
GW
Date
08/2013
virtual bool hdi::core::Notifier::isEmpty ( ) const
virtual

Gets whether the target Notifier object is empty (constructed with the default ctor)

Author
GW
Date
08/2013
Returns
true if the target Notifier object is empty, false otherwise
virtual bool hdi::core::Notifier::operator!= ( const Notifier rhs_) const
virtual

Tests whether a given Notifier object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Notifier to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different notifiers, false otherwise
virtual Notifier& hdi::core::Notifier::operator= ( const Notifier rhs_)
virtual

Assigns one Notifier object to another.

Author
GW
Date
08/2013
Parameters
rhs_Existing Notifier object to copy values from
Returns
The target Notifier object, but with its values updated to match that of the rhs_ argument
virtual bool hdi::core::Notifier::operator== ( const Notifier rhs_) const
virtual

Tests whether a given Notifier object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Notifier to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same notifier, false otherwise
virtual void hdi::core::Notifier::setActive ( const bool  active_)
virtual

Sets whether the notifier is active.

Author
GW
Date
08/2013
Parameters
active_true to enable the notifier, false to disable
Note
This method simply calls activate() or deactivate() as appropriate
virtual void hdi::core::Notifier::setCallback ( const Callback cb_)
virtual

Sets the callback for the notifier.

Author
GW
Date
08/2013
Parameters
cb_New callback to be performed when the notifier fires
virtual NotifierType hdi::core::Notifier::type ( ) const
virtual

Gets the type of the notifier.

Author
GW
Date
08/2013
Returns
Notifier type