DataDirector API
DDD_ConvertMean.h
Go to the documentation of this file.
1 #ifndef _CONVERT_MEAN_H_
2 #define _CONVERT_MEAN_H_
3 
4 /*! \file DDD_ConvertMean.h
5  \brief The DDD_ConvertMean class. Data Director converter.
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 #include "DDD_ConvertBase.h"
45 #include "DDD_ConnectionEndpoint.h"
46 
47 namespace disti
48 {
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /** \brief Mean (Average) Converter
52  *
53  * Finds the arithmetic mean (average) of inputs. <br>
54  * input: [1,MAX_CONVERTER_INPUT] <br>
55  * ouput: [1,MAX_CONVERTER_OUTPUT] <br>
56  * parameters: \a (none) <br>
57  */
59 {
60 public:
61 
62  /** Constructor
63  * \param observer An attribute observer that will observer the parameters of the converter
64  * All converter parameters must use this observer for the converter to work right in the
65  * Data Director GUI.
66  */
68 
69  /** Destructor */
70  virtual ~DDD_ConvertMean();
71 
72  static const char* CONVERT_MEAN_CLASSNAME; /**< Classname string constant. Needed by the ConverterFactory */
73 
74  // Overrides from DDD_ConvertBase
75  virtual bool Convert(DDD_EndpointList& inputs, DDD_EndpointList& outputs);
76 
77  virtual int MaxInputs() { return MAX_CONVERTER_INPUT; }
78  virtual int MaxOutputs(){ return MAX_CONVERTER_OUTPUT; }
79  virtual bool Init(const std::string &paramStr);
80  virtual const char* ClassName() { return CONVERT_MEAN_CLASSNAME; }
81  virtual const char* Description() { return "Finds the arithmetic mean of inputs."; }
82 };
83 
84 } // end namespace disti
85 #endif
86 
The DDD_EndpintList class. A list of DDD_Endpoints.
Definition: DDD_ConnectionEndpoint.h:119
static const char * CONVERT_MEAN_CLASSNAME
Definition: DDD_ConvertMean.h:72
Abstract base class for all DDD_DataDirector converters.
Definition: DDD_ConvertBase.h:68
The DDD_ConvertBase class. Base class for Data Director converters.
DDD_ConvertMean(DDD_AttributeObserver *observer)
virtual bool Init(const std::string &paramStr)
virtual int MaxInputs()
Definition: DDD_ConvertMean.h:77
#define MAX_CONVERTER_OUTPUT
Definition: DDD_ConvertBase.h:65
A virtual interface class for observers of attributes. AttributeObserver-derived objects are able to ...
Definition: DDD_AttributeBase.h:66
#define MAX_CONVERTER_INPUT
Definition: DDD_ConvertBase.h:64
Mean (Average) Converter.
Definition: DDD_ConvertMean.h:58
virtual const char * ClassName()
Definition: DDD_ConvertMean.h:80
virtual bool Convert(DDD_EndpointList &inputs, DDD_EndpointList &outputs)
virtual const char * Description()
Definition: DDD_ConvertMean.h:81
virtual int MaxOutputs()
Definition: DDD_ConvertMean.h:78
Definition: AttributeChangedEmitter.h:46