aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c++-qt/src/gatsstream.cpp5
-rw-r--r--c++-qt/src/gatsstream.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/c++-qt/src/gatsstream.cpp b/c++-qt/src/gatsstream.cpp
index 3874de2..920b2d6 100644
--- a/c++-qt/src/gatsstream.cpp
+++ b/c++-qt/src/gatsstream.cpp
@@ -69,6 +69,11 @@ Gats::Object *Gats::GatsStream::readObject()
69 return pObj; 69 return pObj;
70} 70}
71 71
72void Gats::GatsStream::readAllObjects()
73{
74 while( readObject() ) { }
75}
76
72void Gats::GatsStream::writeObject( Gats::Object *pObject ) 77void Gats::GatsStream::writeObject( Gats::Object *pObject )
73{ 78{
74 QIODevice *pTmp; 79 QIODevice *pTmp;
diff --git a/c++-qt/src/gatsstream.h b/c++-qt/src/gatsstream.h
index f1c0625..90e0514 100644
--- a/c++-qt/src/gatsstream.h
+++ b/c++-qt/src/gatsstream.h
@@ -32,6 +32,14 @@ namespace Gats
32 * non-null then hasReadBuffer should return false on it's next call. 32 * non-null then hasReadBuffer should return false on it's next call.
33 */ 33 */
34 Gats::Object *readObject(); 34 Gats::Object *readObject();
35
36 /**
37 * Works exactly like readObject, except it reads all pending objects
38 * and emits a objectRead signal for each one read. It doesn't return
39 * anything. This is perfect for connecting to a QIODevice's readRead
40 * signal.
41 */
42 void readAllObjects();
35 43
36 public: 44 public:
37 /** 45 /**