From 82da0238a8171cf8bba6bb1c82d5abba207a10aa Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 31 Mar 2012 17:34:11 +0000 Subject: Gats for QT is here. It's a pretty basic conversion right now, it doesn't support debugging formatting (Bu::sio), it doesn't support gats-text string parsing, and the exceptions need to be fixed to be real exceptions. The basic functions have been renamed to match the Qt API and we use QT types for everything (QHash, QList, QByteArray). It needs more testing, but it's a great start. --- c++-qt/src/integer.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 c++-qt/src/integer.cpp (limited to 'c++-qt/src/integer.cpp') diff --git a/c++-qt/src/integer.cpp b/c++-qt/src/integer.cpp new file mode 100644 index 0000000..bb6da80 --- /dev/null +++ b/c++-qt/src/integer.cpp @@ -0,0 +1,32 @@ +#include "gats-qt/integer.h" + +Gats::Integer::Integer() : + iVal( 0 ) +{ +} + +Gats::Integer::Integer( int64_t iVal ) : + iVal( iVal ) +{ +} + +Gats::Integer::~Integer() +{ +} + +void Gats::Integer::write( QIODevice &rOut ) const +{ + rOut.write("i", 1 ); + writePackedInt( rOut, iVal ); +} + +void Gats::Integer::read( QIODevice &rIn, char cType ) +{ + readPackedInt( rIn, iVal ); +} +/* +Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Integer &i ) +{ + return f << "(int) " << i.getValue(); +} +*/ -- cgit v1.2.3