1 //
2 //	aegis - project change supervisor
3 //	Copyright (C) 1994, 1996, 2002, 2005-2008 Peter Miller
4 //
5 //	This program is free software; you can redistribute it and/or modify
6 //	it under the terms of the GNU General Public License as published by
7 //	the Free Software Foundation; either version 3 of the License, or
8 //	(at your option) any later version.
9 //
10 //	This program is distributed in the hope that it will be useful,
11 //	but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //	GNU General Public License for more details.
14 //
15 //	You should have received a copy of the GNU General Public License
16 //	along with this program. If not, see
17 //	<http://www.gnu.org/licenses/>.
18 //
19 
20 #ifndef AEGIS_AER_VALUE_REAL_H
21 #define AEGIS_AER_VALUE_REAL_H
22 
23 #include <libaegis/aer/value.h>
24 
25 /**
26   * The rpt_value_real class is used to represent a value which is a
27   * floating point value (at least 64 bits).
28   */
29 class rpt_value_real:
30     public rpt_value
31 {
32 public:
33     /**
34       * The destructor.
35       */
36     virtual ~rpt_value_real();
37 
38 private:
39     /**
40       * The constructor.  It is private on purpose, use the "create"
41       * class method nstead.
42       */
43     rpt_value_real(double value);
44 
45 public:
46     /**
47       * The create class method is used to create new dynamically
48       * allocated instances of this class.
49       */
50     static rpt_value::pointer create(double value);
51 
52     /**
53       * The query method may be used to obtain the value of this class.
54       */
55     double query() const;
56 
57 protected:
58     // See base class for documentation.
59     rpt_value::pointer integerize_or_null() const;
60 
61     // See base class for documentation.
62     rpt_value::pointer stringize_or_null() const;
63 
64     // See base class for documentation.
65     rpt_value::pointer booleanize_or_null() const;
66 
67     // See base class for documentation.
68     const char *name() const;
69 
70 private:
71     /**
72       * The value instance variable is used to remember the value of
73       * this object.
74       */
75     double value;
76 
77     /**
78       * The default constructor.  Do not use.
79       */
80     rpt_value_real();
81 
82     /**
83       * The copy constructor.  Do not use.
84       */
85     rpt_value_real(const rpt_value_real &);
86 
87     /**
88       * The assignment operator.  Do not use.
89       */
90     rpt_value_real &operator=(const rpt_value_real &);
91 };
92 
93 #endif // AEGIS_AER_VALUE_REAL_H
94