diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-09 17:20:11 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-09 17:20:11 +0000 |
commit | d534a56d95bca7bdd812be024d9eacba4734e2b7 (patch) | |
tree | f9b98ee2b80e645a7b54e7934882be6c9f73c165 /c++-qt/src/float.h | |
parent | 61ccc86fdf06f12cb72a8b7e65286f812cf62154 (diff) | |
download | libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.gz libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.bz2 libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.xz libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.zip |
Many changes: tabconv'd the C++ code, added a license, BSD, and docs.
Diffstat (limited to '')
-rw-r--r-- | c++-qt/src/float.h | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/c++-qt/src/float.h b/c++-qt/src/float.h index 93bfe18..6cc9950 100644 --- a/c++-qt/src/float.h +++ b/c++-qt/src/float.h | |||
@@ -1,3 +1,10 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2012 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libgats library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
1 | #ifndef GATS_FLOAT_H | 8 | #ifndef GATS_FLOAT_H |
2 | #define GATS_FLOAT_H | 9 | #define GATS_FLOAT_H |
3 | 10 | ||
@@ -5,26 +12,26 @@ | |||
5 | 12 | ||
6 | namespace Gats | 13 | namespace Gats |
7 | { | 14 | { |
8 | class Float : public Gats::Object | 15 | class Float : public Gats::Object |
9 | { | 16 | { |
10 | Q_OBJECT; | 17 | Q_OBJECT; |
11 | public: | 18 | public: |
12 | Float(); | 19 | Float(); |
13 | Float( double f ); | 20 | Float( double f ); |
14 | virtual ~Float(); | 21 | virtual ~Float(); |
15 | 22 | ||
16 | virtual Object *clone() const; | 23 | virtual Object *clone() const; |
17 | 24 | ||
18 | virtual Type getType() const { return typeFloat; } | 25 | virtual Type getType() const { return typeFloat; } |
19 | double getValue() const { return fVal; } | 26 | double getValue() const { return fVal; } |
20 | 27 | ||
21 | virtual void write( QIODevice &rOut ) const; | 28 | virtual void write( QIODevice &rOut ) const; |
22 | virtual void read( QIODevice &rIn, char cType ); | 29 | virtual void read( QIODevice &rIn, char cType ); |
23 | 30 | ||
24 | private: | 31 | private: |
25 | double fVal; | 32 | double fVal; |
26 | mutable QByteArray sWriteCache; | 33 | mutable QByteArray sWriteCache; |
27 | }; | 34 | }; |
28 | } | 35 | } |
29 | 36 | ||
30 | //Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Float &flt ); | 37 | //Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Float &flt ); |