summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
authorchatty1993-11-29 10:37:31 +0000
committerchatty1993-11-29 10:37:31 +0000
commit4a99b484b2d29c9f7cf2c6fcd315b1c849298042 (patch)
treecf89e40cada9e25f8faa8a525afd4d67f9ef2d7a /comm
parentcf5ac26fc18c06cf9b185efdf5b68a4a13217416 (diff)
downloadivy-league-4a99b484b2d29c9f7cf2c6fcd315b1c849298042.zip
ivy-league-4a99b484b2d29c9f7cf2c6fcd315b1c849298042.tar.gz
ivy-league-4a99b484b2d29c9f7cf2c6fcd315b1c849298042.tar.bz2
ivy-league-4a99b484b2d29c9f7cf2c6fcd315b1c849298042.tar.xz
Rename Get (char*...) into GetString to avoid confusion with Get (byte*...)
Diffstat (limited to 'comm')
-rw-r--r--comm/MsgBuffer.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/comm/MsgBuffer.h b/comm/MsgBuffer.h
index 0f6a55c..8f96358 100644
--- a/comm/MsgBuffer.h
+++ b/comm/MsgBuffer.h
@@ -18,7 +18,7 @@
#include "cplus_bugs.h"
#include "global.h"
#include "ccu/SmartPointer.h"
-
+class CcuString;
class UchMessage;
// Buffer is the buffer itself, End points after its last byte
@@ -58,13 +58,14 @@ public:
void Append (UchMessage&);
bool Get (byte*, int, bool = FALSE);
- bool Get (byte*, bool = FALSE);
- bool Get (char* c, bool peek = FALSE) { return Get ((byte*) c, peek); }
- bool Get (lword* l, bool peek = FALSE) { return Get ((byte*) l, lwsize, peek); }
- bool Get (sword* s, bool peek = FALSE) { return Get ((byte*) s, swsize, peek); }
+ bool Get (byte& b, bool peek = FALSE) { return Get (&b, 1, peek); }
+ bool Get (char& c, bool peek = FALSE) { return Get ((byte*) &c, 1, peek); }
+ bool Get (lword& l, bool peek = FALSE) { return Get ((byte*) &l, lwsize, peek); }
+ bool Get (sword& s, bool peek = FALSE) { return Get ((byte*) &s, swsize, peek); }
int Get (char*, int, char, bool = FALSE);
- int Get (char*, int, const char* = 0, bool = FALSE);
- bool Get (UchMessage*);
+ int Get (char*, int = -1, const char* = 0, bool = FALSE);
+ int Get (CcuString&, bool = FALSE);
+ bool Get (UchMessage&);
bool Peek (byte*, lword = 0);
bool Peek (sword*, lword = 0);
@@ -92,11 +93,12 @@ public:
UchMsgBuffer& operator << (char c) { Append (c); return *this; }
UchMsgBuffer& operator << (const char* s) { Append (s, TRUE); return *this; }
- UchMsgBuffer& operator >> (lword& l) { Get (&l); return *this; }
- UchMsgBuffer& operator >> (sword& s) { Get (&s); return *this; }
- UchMsgBuffer& operator >> (byte& b) { Get ((byte*) &b, FALSE); return *this; }
- UchMsgBuffer& operator >> (char& c) { Get ((byte*) &c, FALSE); return *this; }
- UchMsgBuffer& operator >> (char* s) { Get (s, -1); return *this; }
+ UchMsgBuffer& operator >> (lword& l) { Get (l); return *this; }
+ UchMsgBuffer& operator >> (sword& s) { Get (s); return *this; }
+ UchMsgBuffer& operator >> (byte& b) { Get (b); return *this; }
+ UchMsgBuffer& operator >> (char& c) { Get (c); return *this; }
+ UchMsgBuffer& operator >> (char* s) { Get (s); return *this; }
+ UchMsgBuffer& operator >> (CcuString& s) { Get (s); return *this; }
#ifdef DOC
UchMsgBuffer& operator << (type data);