aboutsummaryrefslogtreecommitdiff
path: root/src/boolean.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boolean.cpp')
-rw-r--r--src/boolean.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/boolean.cpp b/src/boolean.cpp
deleted file mode 100644
index 729e644..0000000
--- a/src/boolean.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
1#include "gats/boolean.h"
2
3#include <bu/formatter.h>
4#include <bu/stream.h>
5
6Gats::Boolean::Boolean() :
7 bVal( false )
8{
9}
10
11Gats::Boolean::Boolean( bool bVal ) :
12 bVal( bVal )
13{
14}
15
16Gats::Boolean::~Boolean()
17{
18}
19
20Gats::Object *Gats::Boolean::clone() const
21{
22 return new Gats::Boolean( bVal );
23}
24
25void Gats::Boolean::write( Bu::Stream &rOut ) const
26{
27 if( bVal )
28 {
29 rOut.write("1", 1 );
30 }
31 else
32 {
33 rOut.write("0", 1 );
34 }
35}
36
37void Gats::Boolean::read( Bu::Stream &rIn, char cType )
38{
39 if( cType == '1' )
40 {
41 bVal = true;
42 }
43 else
44 {
45 bVal = false;
46 }
47}
48
49Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Boolean &b )
50{
51 return f << "(bool) " << b.getValue();
52}
53