Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreNotifier.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_NOTIFIER__
8#define __HDI_CORE_NOTIFIER__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreTypes.h"
13
14namespace hdi
15{
16 namespace core
17 {
18 class Callback;
19
24 {
25 public:
38
46 Notifier(const Notifier& n_);
47
57 Notifier(const NotifierType type_, const Callback& responder_);
58
64 virtual ~Notifier();
65
75 virtual Notifier& operator=(const Notifier& rhs_);
76
85 virtual bool operator==(const Notifier& rhs_) const;
86
95 virtual bool operator!=(const Notifier& rhs_) const;
96
104 virtual bool isEmpty() const;
105
113 virtual NotifierType type() const;
114
122 virtual bool active() const;
123
133 virtual void setActive(const bool active_);
134
140 virtual void activate() const;
141
147 virtual void deactivate() const;
148
156 virtual Callback* const callback() const;
157
165 virtual void setCallback(const Callback& cb_);
166
167
168 private:
172 void* __data;
173 };
174
175 typedef std::unique_ptr<Notifier> NotifierUP;
176 typedef std::shared_ptr<Notifier> NotifierSP;
177 typedef std::weak_ptr<Notifier> NotifierWP;
178 }
179}
180
181#endif
182// HDI_CORE_AIP_MODE
183
184#endif
185// __HDI_CORE_NOTIFIER__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks.
Definition: hdicoreNotifier.h:24
virtual void deactivate() const
Deactivates (disables) the notifier.
virtual void activate() const
Activates (enables) the notifier.
virtual NotifierType type() const
Gets the type of the notifier.
virtual Callback *const callback() const
Gets the registered callback for the notifier.
virtual bool isEmpty() const
Gets whether the target Notifier object is empty (constructed with the default ctor)
virtual Notifier & operator=(const Notifier &rhs_)
Assigns one Notifier object to another.
Notifier(const NotifierType type_, const Callback &responder_)
Constructs a Notifier object to fire a responder (target and action) when Illustrator sends a notific...
virtual ~Notifier()
Destructs a Notifier object, deactivating it first.
Notifier(const Notifier &n_)
Constructs a new Notifier object from an existing Notifier object (copy constructor)
Notifier()
Constructs an empty Notifier object.
virtual bool active() const
Gets whether the notifier is active.
virtual void setCallback(const Callback &cb_)
Sets the callback for the notifier.
virtual void setActive(const bool active_)
Sets whether the notifier is active.
virtual bool operator!=(const Notifier &rhs_) const
Tests whether a given Notifier object is not the same as another.
virtual bool operator==(const Notifier &rhs_) const
Tests whether a given Notifier object is the same as another.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
NotifierType
Describes the types of Illustrator notifiers for which subscriptions are available.
Definition: hdicoreTypes.h:1264