![]() |
![]() |
PRequestBuf(size_t size);
The constructor will attempt to allocate a block of memory of the specified size. If the memory cannot be allocated, a general CQ_FAILURE exception is thrown.
PRequestBuf(void * h);
The constructor assumes that the memory block was already allocated before the constructor was called. The memory block passed in must have been allocated with PageMaker's memory calls, because the destructor will delete the block using these calls.
~PRequestBuf();
The destructor frees the memory used by the PRequestBuf. It assumes that the memory was allocated with PageMaker's memory functions.
operator<<()
functions. These are used to copy values into the PRequestbuf object, using
a similar syntax to an ostream object.
PRequestBuf& operator<< (short aShort);
// C string
PRequestBuf& operator<< (unsigned short aShort);
PRequestBuf& operator<< (long aLong);
PRequestBuf& operator<< (unsigned long aLong);
PRequestBuf& operator<< (const char * aString);
//
Pascal string
PRequestBuf& operator<< (const unsigned const char * aString);
// Append
a buffer
PRequestBuf& operator<< (PRequestBuf& aBuf);
operator const char *(); const { return bufPtr; }
Returns the PRequestBuf object as if it were a string.
size_t Size() const { return (long) curCh - (long) bufPtr; }
Returns how many bytes have been copied to the request buffer.
PMHandle bufHdl;
The request buffer handle.
const char * curCh;
Pointer to the current character. The operator<< functions use this to copy to.
const char * bufPtr;
A dererenced pointer to bufHdl.
A PRequestBuf object is normally used inside a high level command or query object's constructor. For an example, refer to PFind.
Comments or suggestions? Contact Adobe Developer Support