aboutsummaryrefslogtreecommitdiff
path: root/src/float.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-08-19 06:28:17 +0000
committerMike Buland <eichlan@xagasoft.com>2010-08-19 06:28:17 +0000
commit11b5a91c5884d496744911f261ed6c2b053b9940 (patch)
tree61ed65f187e0719f141d80d4e1e648aeff311024 /src/float.h
parent9dc8cc535ef5fc4ea78f967fe285fe4424ff4458 (diff)
downloadlibgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.gz
libgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.bz2
libgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.xz
libgats-11b5a91c5884d496744911f261ed6c2b053b9940.zip
Wow, it pretty much all works. the float format is a little funny, I treat it
as a string, with a string header and then string data that is then turned into a float. It's pretty much how it's going to work, unless I come up with something revolutionary.
Diffstat (limited to 'src/float.h')
-rw-r--r--src/float.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/float.h b/src/float.h
index cf20010..1b3a06a 100644
--- a/src/float.h
+++ b/src/float.h
@@ -1,16 +1,25 @@
1#ifndef GATS_FLOAT_H 1#ifndef GATS_FLOAT_H
2#define GATS_FLOAT_H 2#define GATS_FLOAT_H
3 3
4#include "gats/object.h"
5
4namespace Gats 6namespace Gats
5{ 7{
6 class Float 8 class Float : public Gats::Object
7 { 9 {
8 public: 10 public:
9 Float(); 11 Float();
10 Float( double f ); 12 Float( double f );
11 virtual ~Float(); 13 virtual ~Float();
12 14
15 virtual Type getType() const { return typeFloat; }
16 double getValue() const { return fVal; }
17
18 virtual void write( Bu::Stream &rOut ) const;
19 virtual void read( Bu::Stream &rIn, char cType );
20
13 private: 21 private:
22 double fVal;
14 }; 23 };
15} 24}
16 25