Not all query classes need a PReplyBuf object; its primary role is handling queries that return a variable amount of data. Queries that return a fixed amount of data generally do not use PReplyBuf objects.
PReplyBuf(const char * ch);
A PReplyBuf object is created with a pointer to the memory it is responsible for. Note that this class does not know how much data it is responsible for, nor is it responsible for allocating or deleting the memory that it refers to.
operator>>()
functions to
extract fields from the reply buffer.
PReplyBuf& operator>> (const char ** aStringRef);
Just set const char * and scan over the string. The C string is not copied.
PReplyBuf& operator>> (const char * aString);
Copy the C string. The receiving buffer must be large enough to fit the whole string.
PReplyBuf& operator>> (unsigned const char * aString);
Copy the Pascal string.
PReplyBuf& operator>> (short& aShort);
Scan two bytes and put short value into aShort.
PReplyBuf& operator>> (unsigned short& aShort);
Scan two bytes and put short value into aShort.
PReplyBuf& operator>> (long& aLong);
Scan four bytes and put short value into aLong.
PReplyBuf& operator>> (unsigned long& aLong);
Scan four bytes and put short value into aLong.
operator const char *();
Return a pointer to the current value (curCh). This may be different than the original value passed to the constructor.
void Reset();
Reset curCh to point to the start of the buffer (bufStart).
const char * bufStart;
Always points to the beginning address that was a parameter to the constructor.
const char * curCh;
Points to the current position being scanned. This field is updated by various operator>>() functions.
Comments or suggestions? Contact Adobe Developer Support