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