DataDirector API
DDD_AttributeInt.h
Go to the documentation of this file.
1 /*! \file DDD_AttributeInt.h
2  \brief The DDD_AttributeInt class. Integer attribute
3  \par Copyright Information
4 
5  Copyright (c) 2012 The DiSTI Corporation.<br>
6  11301 Corporate Blvd; Suite 100<br>
7  Orlando, Florida 32817<br>
8  USA<br>
9  <br>
10  All rights reserved.<br>
11 
12  This Software contains proprietary trade secrets of DiSTI and may not be
13 reproduced, in whole or part, in any form, or by any means of electronic,
14 mechanical, or otherwise, without the written permission of DiSTI. Said
15 permission may be derived through the purchase of applicable DiSTI product
16 licenses which detail the distribution rights of this content and any
17 Derivative Works based on this or other copyrighted DiSTI Software.
18 
19  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
20 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
21 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
22 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
23 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
24 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
25 
26  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
27 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
28 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
29 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
30 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
31 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBLITY
32 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
33 EXCEED FIVE DOLLARS (US$5.00).
34 
35  The aforementioned terms and restrictions are governed by the laws of the
36 State of Florida and the United States of America.
37 
38 */
39 
40 #ifndef _DDD_AttributeInt_h_
41 #define _DDD_AttributeInt_h_
42 
43 #include "DDD_AttributeBase.h"
44 
45 namespace disti
46 {
47 
48 /** \brief DataDirector attribute class corresponding to a signed 32-bit integer datatype.
49  * \ingroup GroupAttributes
50  */
51 class DDD_EXPORT DDD_AttributeInt : public DDD_AttributeBase
52 {
53 public:
54 
55  /** constructor
56  * \param name The attribute's name
57  * \param initialVal The attribute's initial value
58  * \param container The container that will "own" this attribute
59  * \param validConnectionStates Valid connection states for the attribute (INPUT,OUTPUT, IN_OUT); see DDD_AttributeBase::ConnectionState
60  * \param persistent True if it's a persistent attribute
61  * \param revertable If not NULL, it's a pointer to the revertable attribute for this attribute
62  */
63  DDD_AttributeInt(const std::string &name,int initialVal, DDD_AttributeContainer *container, int validConnectionStates,bool persistent,DDD_AttributeBase *revertable);
64 
65  // DDD_AttributeBase methods
66  virtual DataType GetPreferredDataType() const;
67 
68  virtual std::string GetValueString() const;
69  virtual void SetValueString(const std::string &value,bool notify, DDD_AttributeObserver *originator);
70 
71  virtual int GetValueInt(void) const;
72  virtual void SetValueInt(const int value,bool notify, DDD_AttributeObserver *originator);
73 
74  virtual unsigned int GetValueUInt(void) const;
75  virtual void SetValueUInt(const unsigned int value,bool notify, DDD_AttributeObserver *originator);
76 
77  virtual double GetValueDouble(void) const;
78  virtual void SetValueDouble(const double value,bool notify, DDD_AttributeObserver *originator);
79 
80  virtual bool GetValueBool(void) const;
81  virtual void SetValueBool(const bool value,bool notify, DDD_AttributeObserver *originator);
82 
83  virtual void SetValueByteBuffer(const char *buffer, unsigned int length, bool notify, DDD_AttributeObserver *originator);
84  virtual void GetValueByteBuffer(char **buffer, unsigned int &length);
85 
86 protected:
87  int _value;
88 };
89 
90 
91 } // end namespace disti
92 #endif
93 
DDD_AttributeContainer. A virtual interface class for containers of attributes.
Definition: DDD_AttributeBase.h:57
A virtual interface class for all DataDirector attribute types.
Definition: DDD_AttributeBase.h:87
DataType
Definition: DDD_AttributeBase.h:104
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 signed 32-bit integer datatype.
Definition: DDD_AttributeInt.h:51
Definition: AttributeChangedEmitter.h:46