From 4a99b484b2d29c9f7cf2c6fcd315b1c849298042 Mon Sep 17 00:00:00 2001 From: chatty Date: Mon, 29 Nov 1993 10:37:31 +0000 Subject: Rename Get (char*...) into GetString to avoid confusion with Get (byte*...) --- comm/MsgBuffer.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'comm') 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); -- cgit v1.1