Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
float_value.hpp
Go to the documentation of this file.
1 //
2 // BEGIN_DOUGLAS_MARK_ROYER_COPYRIGHT
3 //
4 // Copyright (C) 2000-2014 Douglas Mark Royer, All Rights Reserved.
5 //
6 // NOTICE:
7 //
8 // THIS SOURCE CODE BELONGS TO DOUGLAS MARK ROYER
9 // THIS CODE IS CONSIDERED A
10 // TRADE SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE
11 // NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.
12 //
13 //
14 // THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY UNITED STATES
15 // COPYRIGHT LAW (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION
16 // AND/OR SALE MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES
17 // OF UP TO $100,000 (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO
18 // BE SUBJECT TO CIVIL LIABILITY.
19 //
20 // THIS NOTICE AND THE ABOVE COPYRIGHT NOTICE MUST REMAIN IN ALL
21 // COPIES AND ANY DERIVED WORK.
22 //
23 // ALL OF THIS CODE IS ORIGINAL WORK BY THE COPYRIGHT HOLDER.
24 //
25 // THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN IS
26 // PROVIDED ON AN "AS IS" BASIS AND INET-CONSULTING.COM, INC.
27 // DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
28 // NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
29 // HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
30 // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
31 // PURPOSE. ANY SERVICE CONTRACT WILL BE UNDER A SEPARATE
32 // LICENSE.
33 //
34 // END_DOUGLAS_MARK_ROYER_COPYRIGHT
35 //
36 
44 #ifndef __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_FLOAT_VALUE_HPP__
45 #define __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_FLOAT_VALUE_HPP__
46 
47 #ifndef EXPORT_ICALENDAR
48 #ifdef BUILDING_LIBRARY_ICALENDAR
49 #define EXPORT_ICALENDAR EXPORT_OUT
50 #else
51 #define EXPORT_ICALENDAR EXPORT_IN
52 #endif
53 #endif
54 
55 #include <SaS/iCalendar/iCalendar.hpp>
56 #include <SaS/iCalendar/BaseValueType.hpp>
57 
58 using namespace std;
62 
63 namespace SoftwareAndServices
64 {
65  namespace Library
66  {
67  namespace iCalendar
68  {
73  class EXPORT_ICALENDAR float_value
74  : public BaseValueType
75  {
76 
77  public:
78 
86  float_value(double fValue = 0.0, int rDigits = INT_MAX);
87 
91  virtual ~float_value();
92 
100  virtual bool sprint(String * Results) const;
101 
111  bool parse(Parse & in, component * errors);
112 
122  bool parse(const char * in, component * errors);
123 
127  double get() const;
128 
132  int getRDigits() const;
133 
139  bool operator==(double Other) const;
140 
146  bool operator==(const float_value & Other) const;
147 
153  bool operator==(const float_value * Other) const;
154 
160  bool operator!=(double Other) const;
161 
167  bool operator!=(const float_value & Other) const;
168 
174  bool operator!=(const float_value * Other) const;
175 
181  bool operator<(double Other) const;
182 
188  bool operator<(const float_value & Other) const;
189 
195  bool operator<(const float_value * Other) const;
196 
202  bool operator<=(double Other) const;
203 
209  bool operator<=(const float_value & Other) const;
210 
216  bool operator<=(const float_value * Other) const;
217 
223  bool operator>(double Other) const;
224 
230  bool operator>(const float_value & Other) const;
231 
237  bool operator>(const float_value * Other) const;
238 
244  bool operator>=(double Other) const;
245 
251  bool operator>=(const float_value & Other) const;
252 
258  bool operator>=(const float_value * Other) const;
259 
260  private:
261  double _float;
262  int _rDigits;
263  };
264 
269  typedef vector<float_value*> float_valueVec;
270 
271  }
272  }
273 }
274 
275 #endif /*__DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_FLOAT_VALUE_HPP__*/
STL namespace.
Generic text parsing routines.
Definition: Parse.hpp:102
vector< float_value * > float_valueVec
An array of float_value.
An RFC-iCalendar implementation of a FLOAT parameter.
Definition: float_value.hpp:73
This is a class that allows:
Definition: String.hpp:114
Copyright Douglas Mark Royer DouglasRoyer@gmail.com.
Definition: Base.hpp:98
The base class for calendar objects.
Definition: iCalendar.hpp:434
All (almost all) values are derived from this base class.
Base class for all RFC-iCalendar components.
Definition: component.hpp:98