diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-08-27 21:53:54 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-08-27 21:53:54 +0000 |
commit | c10c9ef627c7e79fde6170fe334238bbcb5d66e5 (patch) | |
tree | 4a0971d81e666e91866ddeaf9b58b952ce2fdd0a /src/float.cpp | |
parent | 2a72923397d866f33221b9d32a3f9653d1a960e7 (diff) | |
download | libgats-c10c9ef627c7e79fde6170fe334238bbcb5d66e5.tar.gz libgats-c10c9ef627c7e79fde6170fe334238bbcb5d66e5.tar.bz2 libgats-c10c9ef627c7e79fde6170fe334238bbcb5d66e5.tar.xz libgats-c10c9ef627c7e79fde6170fe334238bbcb5d66e5.zip |
Added formatter handlers for debugging, works really well. Also added a bunch
more helpers to make it as easy to use as possible.
Diffstat (limited to '')
-rw-r--r-- | src/float.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/float.cpp b/src/float.cpp index e257b37..139df3e 100644 --- a/src/float.cpp +++ b/src/float.cpp | |||
@@ -1,6 +1,8 @@ | |||
1 | #include "gats/float.h" | 1 | #include "gats/float.h" |
2 | #include "gats/integer.h" | 2 | #include "gats/integer.h" |
3 | 3 | ||
4 | #include <bu/formatter.h> | ||
5 | |||
4 | Gats::Float::Float() : | 6 | Gats::Float::Float() : |
5 | fVal( 0.0 ) | 7 | fVal( 0.0 ) |
6 | { | 8 | { |
@@ -35,3 +37,8 @@ void Gats::Float::read( Bu::Stream &rIn, char cType ) | |||
35 | sscanf( buf, "%la", &fVal ); | 37 | sscanf( buf, "%la", &fVal ); |
36 | } | 38 | } |
37 | 39 | ||
40 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Float &flt ) | ||
41 | { | ||
42 | return f << "(float) " << flt.getValue(); | ||
43 | } | ||
44 | |||