diff options
-rw-r--r-- | project2/common/variableType.cpp | 14 | ||||
-rw-r--r-- | project2/common/variableType.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/project2/common/variableType.cpp b/project2/common/variableType.cpp index b19d2fd..2902638 100644 --- a/project2/common/variableType.cpp +++ b/project2/common/variableType.cpp @@ -264,3 +264,17 @@ VariableType::isNull() const return (get<Null>()); } +std::basic_ostream<char> & +operator<<(std::basic_ostream<char> & s, const Null &) +{ + s << "(null)"; + return s; +} + +std::basic_ostream<unsigned char> & +operator<<(std::basic_ostream<unsigned char> & s, const Null &) +{ + s << "(null)"; + return s; +} + diff --git a/project2/common/variableType.h b/project2/common/variableType.h index 5bf4c53..f2a6890 100644 --- a/project2/common/variableType.h +++ b/project2/common/variableType.h @@ -3,6 +3,7 @@ #include <boost/any.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> +#include <boost/date_time/posix_time/posix_time_io.hpp> #include <glibmm/ustring.h> #include <boost/variant.hpp> #include <boost/optional.hpp> @@ -28,6 +29,9 @@ class Null { bool operator==(const Null &) const { return true; } }; +std::basic_ostream<char> & operator<<(std::basic_ostream<char> &, const Null &); +std::basic_ostream<unsigned char> & operator<<(std::basic_ostream<unsigned char> &, const Null &); + class Boolean { public: Boolean(bool v); |