DataDirector API
DDD_EventSubscriber.h
Go to the documentation of this file.
1 #ifndef DDD_EVENT_SUBSCRIBER_H_
2 #define DDD_EVENT_SUBSCRIBER_H_
3 
4 /*! \file DDD_EventSubscriber.h
5  \brief Abstract base classes for DataDirector event subscribers.
6 
7  \par Copyright Information
8 
9  Copyright (c) 2012 The DiSTI Corporation.<br>
10  11301 Corporate Blvd; Suite 100<br>
11  Orlando, Florida 32817<br>
12  USA<br>
13  <br>
14  All rights reserved.<br>
15 
16  This Software contains proprietary trade secrets of DiSTI and may not be
17 reproduced, in whole or part, in any form, or by any means of electronic,
18 mechanical, or otherwise, without the written permission of DiSTI. Said
19 permission may be derived through the purchase of applicable DiSTI product
20 licenses which detail the distribution rights of this content and any
21 Derivative Works based on this or other copyrighted DiSTI Software.
22 
23  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
24 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
25 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
26 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
27 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
28 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
29 
30  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
31 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
32 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
33 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
34 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
35 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBLITY
36 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
37 EXCEED FIVE DOLLARS (US$5.00).
38 
39  The aforementioned terms and restrictions are governed by the laws of the
40 State of Florida and the United States of America.
41 
42 */
43 
44 
45 namespace disti
46 {
47 
48 class DDD_AssetBase;
49 class DDD_ConvertBase;
50 class DDD_Connection;
51 
52 
53 /** \defgroup GroupEvents DataDirector Events */
54 /*@{*/
55 /** \defgroup AssetAddedGroup AssetAdded
56  * \brief Whenever a new asset is added to the DataDirector
57  */
58 /** \defgroup AssetDeletedGroup AssetDeleted
59  * \brief Whenever an asset is about to be deleted
60  */
61 /** \defgroup AssetSelectedGroup AssetSelected
62  * \brief Whenever an asset has been selected
63  */
64 /** \defgroup AssetShiftedGroup AssetShifted
65  * \brief Whenever an asset is shifted up or down within the Director's internal list
66  */
67 /** \defgroup AssetStartedGroup AssetStarted
68  * \brief Whenever an asset is started or stopped
69  */
70 /** \defgroup ConfigurationClearedGroup ConfigurationCleared
71  * \brief Whenever the DataDirector configuration has been cleared
72  */
73 /** \defgroup ConnectionAddedGroup ConnectionAdded
74  * \brief Whenever a connection has been added
75  */
76 /** \defgroup ConnectionDeletedGroup ConnectionDeleted
77  * \brief Whenever a connection has been deleted
78  */
79 /** \defgroup ConnectionSelectedGroup ConnectionSelected
80  * \brief Whenever a connection has been selected
81  */
82 /** \defgroup ConnectionShiftedGroup ConnectionShifted
83  * \brief Whenever a connection has been shifted up/down within the Director's internal list
84  */
85 /** \defgroup ViewerRunningGroup ViewerRunning
86  * \brief Whenever the DataDirectorViewer has started or stopped running
87  */
88 /** \defgroup XMLConfigLoadingGroup XMLConfigLoading
89  * \brief Whenever the DataDirector has started/stopped loading a configuration from XML
90  */
91 /*@}*/
92 
93 ///////////////////////////////////////////////////////////////////////////////////
94 /** \brief Abstract base class for subscribers of the AssetAdded event.
95  * \ingroup AssetAddedGroup
96  */
98 {
99 public:
100 
101  /** The AssetAdded event handling method in this observer
102  * \param asset asset instance that has been added to the Director
103  */
104  virtual void TriggerAssetAdded(DDD_AssetBase* asset) = 0;
105 };
106 
107 ///////////////////////////////////////////////////////////////////////////////////
108 /** \brief Abstract base class for subscribers of the AssetDeleted event.
109  * \ingroup AssetDeletedGroup
110  */
112 {
113 public:
114  /** The AssetDeleted event handling method in this observer
115  * \param asset asset instance that is about to be deleted
116  */
117  virtual void TriggerAssetDeleted(DDD_AssetBase* asset) = 0;
118 };
119 
120 
121 ///////////////////////////////////////////////////////////////////////////////////
122 /** \brief Abstract base class for subscribers of the AssetSelected event.
123  * \ingroup AssetSelectedGroup
124  */
126 {
127 public:
128  /** The AssetSelected event handling method in this observer
129  * \param asset pointer to asset that is currently selected
130  * \warning NULL should be handled gracefully. The Editor treats this case as an unselect event.
131  */
132  virtual void TriggerAssetSelected(DDD_AssetBase* asset) = 0;
133 };
134 
135 ///////////////////////////////////////////////////////////////////////////////////
136 /** \brief Abstract base class for subscribers of the AssetShifted event.
137  * \ingroup AssetShiftedGroup
138  */
140 {
141 public:
143  {
144  ASSET_SHIFT_UP = 0, /*!< asset has switched places with the one before it */
145  ASSET_SHIFT_DOWN = 1 /*!< asset has switched places with the one behind it */
146  };
147  /** The AssetShifted event handling method in this observer
148  * \param asset pointer to asset that is to be shifted
149  * \param direction enum denoting asset's direction for shift.
150  */
151  virtual void TriggerAssetShifted(DDD_AssetBase* asset, AssetShiftDirection direction) = 0;
152 };
153 
154 ///////////////////////////////////////////////////////////////////////////////////
155 /** \brief Abstract base class for subscribers of the AssetStarted event.
156  * \ingroup AssetStartedGroup
157  */
159 {
160 public:
161  /** The AssetStarted event handling method in this observer
162  * \param start true = started; false = stopped
163  * \param asset pointer to asset that is to be started or stopped
164  */
165  virtual void TriggerAssetStarted(bool started, DDD_AssetBase* asset) = 0;
166 };
167 
168 ///////////////////////////////////////////////////////////////////////////////////
169 /** \brief Abstract base class for subscribers of the ConfigurationCleared event.
170  * \ingroup ConfigurationClearedGroup
171  * \note Generally, every subscriber should revert to blank / default state
172  */
174 {
175 public:
176  /** The ClearConfiguration event handling method in this observer
177  * \note Subcribers should revert to default state and remove any residual
178  * DataDirector-specific data, lest they contain dangling pointers.
179  */
180  virtual void TriggerConfigurationCleared() = 0;
181 };
182 
183 ///////////////////////////////////////////////////////////////////////////////////
184 /** \brief Abstract base class for subscribers of the ConnectionAdded event.
185  * \ingroup ConnectionAddedGroup
186  */
188 {
189 public:
190  /** The ConnectionAdded event handling method in this observer
191  * \param connection pointer to connection that has been added to the Director
192  */
193  virtual void TriggerConnectionAdded(DDD_Connection* connection) = 0;
194 };
195 
196 ///////////////////////////////////////////////////////////////////////////////////
197 /** \brief Abstract base class for subscribers of the ConnectionDeleted event.
198  * \ingroup ConnectionDeletedGroup
199  */
201 {
202 public:
203  /** The ConnectionDeleted event handling method in this observer
204  * \param connection pointer to connection that is about to be deleted from the Director
205  * \post This subscriber should not contain any references to this connection.
206  */
207  virtual void TriggerConnectionDeleted(DDD_Connection* connection) = 0;
208 };
209 
210 ///////////////////////////////////////////////////////////////////////////////////
211 /** \brief Abstract base class for subscribers of the ConnectionSelected event.
212  * \ingroup ConnectionSelectedGroup
213  */
215 {
216 public:
217  /** The ConnectionSelected event handling method in this observer
218  * \param connection pointer to connection that is selected
219  * \warning NULL should be handled gracefully. The Editor treats this case as an "unselect" event.
220  */
221  virtual void TriggerConnectionSelected(DDD_Connection* connection) = 0;
222 };
223 
224 ///////////////////////////////////////////////////////////////////////////////////
225 /** \brief Abstract base class for subscribers of the ConnectionShifted event.
226  * \ingroup ConnectionShiftedGroup
227  */
229 {
230 public:
232  {
233  CONNECTION_SHIFT_UP = 0, /*!< connection has switched places with the one before it */
234  CONNECTION_SHIFT_DOWN = 1 /*!< connection has switched places with the one behind it */
235  };
236  /** The ConnectionShifted event handling method in this observer
237  * \param connection pointer to connection that is to be shifted
238  * \param direction enum denoting connection's direction for shift.
239  */
240  virtual void TriggerConnectionShifted(DDD_Connection* connection, ConnectionShiftDirection direction) = 0;
241 };
242 
243 ///////////////////////////////////////////////////////////////////////////////////
244 /** \brief Abstract base class for subscribers of the ViewerRunning event.
245  * \ingroup ViewerRunningGroup
246  */
248 {
249 public:
250  /** The ViewerRunning event handling method in this observer
251  * \param running true = viewer started, false = viewer stopped
252  */
253  virtual void TriggerViewerRunning(bool running) = 0;
254 };
255 
256 ///////////////////////////////////////////////////////////////////////////////////
257 /** \brief Abstract base class for subscribers of the XMLConfigLoading event.
258  * \ingroup XMLConfigLoadingGroup
259  */
261 {
262 public:
263  /** The XMLConfigLoading event handling method in this observer
264  * \param loading true = started loading, false = stopped loading
265  */
266  virtual void TriggerXMLConfigLoading(bool loading) = 0;
267 };
268 
269 
270 } // end of namespace disti
271 
272 
273 #endif
274 
Abstract base class for subscribers of the AssetSelected event.
Definition: DDD_EventSubscriber.h:125
virtual void TriggerXMLConfigLoading(bool loading)=0
Abstract base class for subscribers of the AssetShifted event.
Definition: DDD_EventSubscriber.h:139
virtual void TriggerViewerRunning(bool running)=0
Abstract base class for subscribers of the ConfigurationCleared event.
Definition: DDD_EventSubscriber.h:173
Abstract base class for subscribers of the AssetStarted event.
Definition: DDD_EventSubscriber.h:158
virtual void TriggerConnectionSelected(DDD_Connection *connection)=0
A virtual interface class for all DataDirector assets.
Definition: DDD_AssetBase.h:115
Abstract base class for subscribers of the ConnectionSelected event.
Definition: DDD_EventSubscriber.h:214
virtual void TriggerConnectionDeleted(DDD_Connection *connection)=0
Abstract base class for subscribers of the ConnectionDeleted event.
Definition: DDD_EventSubscriber.h:200
virtual void TriggerAssetSelected(DDD_AssetBase *asset)=0
AssetShiftDirection
Definition: DDD_EventSubscriber.h:142
Abstract base class for subscribers of the AssetAdded event.
Definition: DDD_EventSubscriber.h:97
Abstract base class for subscribers of the XMLConfigLoading event.
Definition: DDD_EventSubscriber.h:260
virtual void TriggerAssetStarted(bool started, DDD_AssetBase *asset)=0
ConnectionShiftDirection
Definition: DDD_EventSubscriber.h:231
virtual void TriggerAssetDeleted(DDD_AssetBase *asset)=0
Abstract base class for subscribers of the ConnectionShifted event.
Definition: DDD_EventSubscriber.h:228
Definition: DDD_EventSubscriber.h:144
virtual void TriggerAssetShifted(DDD_AssetBase *asset, AssetShiftDirection direction)=0
The DDD_Connection class. Base class for connections between assets.
Definition: DDD_Connection.h:54
Abstract base class for subscribers of the ViewerRunning event.
Definition: DDD_EventSubscriber.h:247
Abstract base class for subscribers of the AssetDeleted event.
Definition: DDD_EventSubscriber.h:111
virtual void TriggerConnectionAdded(DDD_Connection *connection)=0
virtual void TriggerAssetAdded(DDD_AssetBase *asset)=0
virtual void TriggerConnectionShifted(DDD_Connection *connection, ConnectionShiftDirection direction)=0
Abstract base class for subscribers of the ConnectionAdded event.
Definition: DDD_EventSubscriber.h:187
Definition: AttributeChangedEmitter.h:46
Definition: DDD_EventSubscriber.h:145