From c10c9ef627c7e79fde6170fe334238bbcb5d66e5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 27 Aug 2010 21:53:54 +0000 Subject: Added formatter handlers for debugging, works really well. Also added a bunch more helpers to make it as easy to use as possible. --- src/string.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index 416375d..2134a01 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -2,10 +2,27 @@ #include "gats/integer.h" +#include + Gats::String::String() { } +Gats::String::String( const char *s ) : + Bu::FString( s ) +{ +} + +Gats::String::String( const char *s, long iLength ) : + Bu::FString( s, iLength ) +{ +} + +Gats::String::String( long iLength ) : + Bu::FString( iLength ) +{ +} + Gats::String::String( const String &s ) : Bu::FString( s ) { @@ -36,3 +53,8 @@ void Gats::String::read( Bu::Stream &rIn, char cType ) rIn.read( getStr(), iSize ); } +Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::String &s ) +{ + return f << "(str) \"" << dynamic_cast(s) << "\""; +} + -- cgit v1.2.3