DataDirector API
DDD_GlsDisplayFrameAdapter.h
Go to the documentation of this file.
1 /*! \file DDD_GlsDisplayFrameAdapter.h
2  \brief Adapts a GlsDisplayFrame to be an RSO_Asset container.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2012 The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBLITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 
41 #ifndef DDD_GlsDisplayFrameAdapter_H_
42 #define DDD_GlsDisplayFrameAdapter_H_
43 
44 #include <string>
45 #include "DDD_AssetBase.h"
46 #include "DDD_AttributeList.h"
47 #include "DDD_DataDirector.h"
48 
49 namespace disti
50 {
51 
52 class glsDisplayFrame;
53 
54 class DDD_EXPORT DDD_GlsDisplayFrameAdapter
55 {
56 protected:
57  DDD_DataDirector *_director; /**< Data Director instance */
58  glsDisplayFrame *_frame; /**< glsDisplayFrame associated with this adapter */
59 
60 public:
61  /** Constructor.
62  * \param frame The glsDisplayFrame to associate with this adapter */
63  DDD_GlsDisplayFrameAdapter(glsDisplayFrame *frame);
64 
65  /** Destructor */
66  virtual ~DDD_GlsDisplayFrameAdapter();
67 
68  /** Load a Data Director XML config file. Any RSO assets in the config file
69  * will be treated as references to RSOs contained in the associated glDisplayFrame
70  * \param filename The name of the XML file to load
71  * \return True if the XML was successfully parsed
72  */
73  bool LoadXML(const char *filename);
74 
75  /** Pump the Data Director instance associated with this adapter. This call is normally placed into
76  * the Calculate method of the glsDisplayFrame associated with this adapter
77  * \param time The process/calculate time
78  */
79  void Process(double time);
80 
81  /** \return Returns a pointer to the glsDisplayFrame associated with this adapter */
82  glsDisplayFrame *GetDisplayFrame() { return _frame; }
83 
84  /** Searches all instantiated assets for the attribute
85  * \param name The fully qualified name of the attribute to find (e.g. assetName.attribName)
86  * \return Returns a pointer to the attribute or NULL if not found
87  */
88  DDD_AttributeBase *FindAttribute(const std::string &name) { return _director->FindAttribute(name); }
89 
90  /** Searches all instantiated assets by name
91  * \param assetName Asset instance name to find
92  * \return Returns a pointer to the asset if found or NULL if not found
93  */
94  DDD_AssetBase *FindAsset(const std::string &name) { return _director->FindAsset(name); }
95 
96  /** Starts all assets */
97  void StartAssets() { _director->StartAllAssets(); _director->ResumeAllAssets(); }
98 
99  /** Stops all assets */
100  void StopAssets() { _director->StopAllAssets(); }
101 
102 };
103 
104 } //end of namespace disti
105 #endif
106 
DDD_AssetBase * FindAsset(const std::string &assetName)
glsDisplayFrame * _frame
Definition: DDD_GlsDisplayFrameAdapter.h:58
A virtual interface class for all DataDirector attribute types.
Definition: DDD_AttributeBase.h:87
A virtual interface class for all DataDirector assets.
Definition: DDD_AssetBase.h:115
void StopAssets()
Definition: DDD_GlsDisplayFrameAdapter.h:100
The DDD_AttributeList class. Maintains a list of Data Director attributes.
DDD_AttributeBase * FindAttribute(const std::string &name)
Definition: DDD_GlsDisplayFrameAdapter.h:88
DDD_AttributeBase * FindAttribute(const std::string &name)
DDD_DataDirector. Main interface to DataDirector core that encapsulates all Assets, Connections and core logic.
Definition: DDD_DataDirector.h:78
The DDD_AssetBase class. Base class for Data Director assets.
void StartAssets()
Definition: DDD_GlsDisplayFrameAdapter.h:97
DDD_AssetBase * FindAsset(const std::string &name)
Definition: DDD_GlsDisplayFrameAdapter.h:94
glsDisplayFrame * GetDisplayFrame()
Definition: DDD_GlsDisplayFrameAdapter.h:82
Definition: DDD_GlsDisplayFrameAdapter.h:54
DDD_DataDirector * _director
Definition: DDD_GlsDisplayFrameAdapter.h:57
Definition: AttributeChangedEmitter.h:46