LHandleStream is a PowerPlant class that is used for doing LStream operations with data blocks that are relocatable, such as handles.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
General usage for LHandleStream is similar to that of LDataStream and LFileStream.
Source files:
Ancestors:
Purpose:
The constructor creates objects.
Access:
Prototype:
LHandleStream();
LHandleStream( Handle inHandle);Parameters:
The parameter for the constructors is:
Purpose:
The destructor destroys the object.
Access:
Prototype:
virtual ~LHandleStream();
Purpose:
Dissociate the data Handle from a HandleStream. This creates a new, empty data Handle and passes back the existing Handle. Caller assumes ownership of the Handle.
Access:
Prototype:
Handle DetachDataHandle();Parameters:
Return:
Purpose:
Read bytes from a HandleStream to a buffer.
Access:
Prototype:
virtual ExceptionCode GetBytes(Parameters:
void *outBuffer,
SInt32 &ioByteCount );
The parameters for this method are:
Return:
Returns an error code and passes back the number of bytes actually read, which may be less than the number requested if an error occurred.
Purpose:
Retrieves the value of mDataH.
Access:
Prototype:
Handle GetDataHandle();Parameters:
Return:
Returns the value of mDataH.
Purpose:
Write bytes from a buffer to a HandleStream. Grows the data Handle if necessary.
Access:
Prototype:
virtual ExceptionCode PutBytes(Parameters:
const void *inBuffer,
SInt32 &ioByteCount );
The parameters for this method are:
Return:
Returns an error code and passes back the number of bytes actually written, which may be less than the number requested if an error occurred.
memFullErr-Growing Handle failed when trying to write past the current end
of the Stream
Purpose:
Specify a Handle to use as the basis for a HandleStream.
Class assumes ownership of the input Handle and destroys the existing data Handle. Call DetachDataHandle() beforehand if you wish to preserve the existing data Handle.
Access:
Prototype:
void SetDataHandle( Handle inHandle );Parameters:
The parameter for this method is:
Return:
Purpose:
Set the length, in bytes, of the HandleStream.
Access:
Prototype:
virtual void SetLength( SInt32 inLength );Parameters:
The parameter for this method is:
Return:
Purpose:
Access:
Prototype:
Handle mDataH;