aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src/integer.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-09 17:20:11 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-09 17:20:11 +0000
commitd534a56d95bca7bdd812be024d9eacba4734e2b7 (patch)
treef9b98ee2b80e645a7b54e7934882be6c9f73c165 /c++-qt/src/integer.cpp
parent61ccc86fdf06f12cb72a8b7e65286f812cf62154 (diff)
downloadlibgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.gz
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.bz2
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.xz
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.zip
Many changes: tabconv'd the C++ code, added a license, BSD, and docs.
Diffstat (limited to '')
-rw-r--r--c++-qt/src/integer.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/c++-qt/src/integer.cpp b/c++-qt/src/integer.cpp
index 82727f3..721c434 100644
--- a/c++-qt/src/integer.cpp
+++ b/c++-qt/src/integer.cpp
@@ -1,12 +1,19 @@
1/*
2 * Copyright (C) 2007-2012 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libgats library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
1#include "gats-qt/integer.h" 8#include "gats-qt/integer.h"
2 9
3Gats::Integer::Integer() : 10Gats::Integer::Integer() :
4 iVal( 0 ) 11 iVal( 0 )
5{ 12{
6} 13}
7 14
8Gats::Integer::Integer( int64_t iVal ) : 15Gats::Integer::Integer( int64_t iVal ) :
9 iVal( iVal ) 16 iVal( iVal )
10{ 17{
11} 18}
12 19
@@ -16,22 +23,22 @@ Gats::Integer::~Integer()
16 23
17Gats::Object *Gats::Integer::clone() const 24Gats::Object *Gats::Integer::clone() const
18{ 25{
19 return new Gats::Integer( iVal ); 26 return new Gats::Integer( iVal );
20} 27}
21 28
22void Gats::Integer::write( QIODevice &rOut ) const 29void Gats::Integer::write( QIODevice &rOut ) const
23{ 30{
24 rOut.write("i", 1 ); 31 rOut.write("i", 1 );
25 writePackedInt( rOut, iVal ); 32 writePackedInt( rOut, iVal );
26} 33}
27 34
28void Gats::Integer::read( QIODevice &rIn, char cType ) 35void Gats::Integer::read( QIODevice &rIn, char cType )
29{ 36{
30 readPackedInt( rIn, iVal ); 37 readPackedInt( rIn, iVal );
31} 38}
32/* 39/*
33Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Integer &i ) 40Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Integer &i )
34{ 41{
35 return f << "(int) " << i.getValue(); 42 return f << "(int) " << i.getValue();
36} 43}
37*/ 44*/