diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
| commit | 380b36be3352cd9a5c93dbd67db25346166a8547 (patch) | |
| tree | f69613e7b6238744c34af6dc14d6feb68a4f6706 /src/null.cpp | |
| parent | 3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc (diff) | |
| download | libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.gz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.bz2 libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.xz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.zip | |
All languages now support Null except for python and php, python is proving
slightly trickier.
Diffstat (limited to 'src/null.cpp')
| -rw-r--r-- | src/null.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/null.cpp b/src/null.cpp new file mode 100644 index 0000000..13a61ed --- /dev/null +++ b/src/null.cpp | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #include "gats/null.h" | ||
| 2 | |||
| 3 | #include <bu/formatter.h> | ||
| 4 | #include <bu/stream.h> | ||
| 5 | |||
| 6 | Gats::Null::Null() | ||
| 7 | { | ||
| 8 | } | ||
| 9 | |||
| 10 | Gats::Null::~Null() | ||
| 11 | { | ||
| 12 | } | ||
| 13 | |||
| 14 | Gats::Object *Gats::Null::clone() const | ||
| 15 | { | ||
| 16 | return new Gats::Null(); | ||
| 17 | } | ||
| 18 | |||
| 19 | void Gats::Null::write( Bu::Stream &rOut ) const | ||
| 20 | { | ||
| 21 | rOut.write("n", 1 ); | ||
| 22 | } | ||
| 23 | |||
| 24 | void Gats::Null::read( Bu::Stream &rIn, char cType ) | ||
| 25 | { | ||
| 26 | // Nothing to do... | ||
| 27 | } | ||
| 28 | |||
| 29 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Null &b ) | ||
| 30 | { | ||
| 31 | return f << "(null)"; | ||
| 32 | } | ||
| 33 | |||
