diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-11-09 16:25:22 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-09 16:25:22 +0000 |
| commit | 74dd68ad611d15abf16a65c36a7cfd3f4492930a (patch) | |
| tree | 843fed9ba6bb03253a01314afc3b1dfbb2dfd26c /c++-libbu++/src/float.h | |
| parent | d9b407475ae3ebe434b29d9eabdd7d4416e17881 (diff) | |
| download | libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.gz libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.bz2 libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.xz libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.zip | |
Made the repo less libbu++-centric.
Diffstat (limited to 'c++-libbu++/src/float.h')
| -rw-r--r-- | c++-libbu++/src/float.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/c++-libbu++/src/float.h b/c++-libbu++/src/float.h new file mode 100644 index 0000000..ba38d6c --- /dev/null +++ b/c++-libbu++/src/float.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #ifndef GATS_FLOAT_H | ||
| 2 | #define GATS_FLOAT_H | ||
| 3 | |||
| 4 | #include "gats/object.h" | ||
| 5 | |||
| 6 | #include <bu/string.h> | ||
| 7 | |||
| 8 | namespace Gats | ||
| 9 | { | ||
| 10 | class Float : public Gats::Object | ||
| 11 | { | ||
| 12 | public: | ||
| 13 | Float(); | ||
| 14 | Float( double f ); | ||
| 15 | virtual ~Float(); | ||
| 16 | |||
| 17 | virtual Object *clone() const; | ||
| 18 | |||
| 19 | virtual Type getType() const { return typeFloat; } | ||
| 20 | double getValue() const { return fVal; } | ||
| 21 | |||
| 22 | virtual void write( Bu::Stream &rOut ) const; | ||
| 23 | virtual void read( Bu::Stream &rIn, char cType ); | ||
| 24 | |||
| 25 | private: | ||
| 26 | double fVal; | ||
| 27 | mutable Bu::String sWriteCache; | ||
| 28 | }; | ||
| 29 | } | ||
| 30 | |||
| 31 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Float &flt ); | ||
| 32 | |||
| 33 | #endif | ||
