Unicorn XML Toolkit
Version 1.50.00

Namespace Core
Class IUnicodeStream

class IUnicodeStream: public CInterface {
public:
    enum {
        begin,
        current,
        end
        };
public:
    virtual ~IUnicodeStream();
public:
    virtual int Read(WCHAR *pBuf, int nCount);
    virtual void Write(const WCHAR *pBuf, int nCount);
    virtual void SetPosition(long lOff, int nFrom);
    virtual long GetPosition();
    };
typedef XInterface<IUnicodeStream> XUnicodeStream;

The base class for Unicode character streams.

Since:
1.00.00
Version:
1.50.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
~IUnicodeStream ();
����������Destroys the Unicode character stream.

Function Summary
int Read (WCHAR *pBuf, int nCount);
����������Reads the specified number of characters into the specified buffer from this stream.
void Write (const WCHAR *pBuf, int nCount);
����������Writes the specified number of characters from the specified buffer to this stream.
void SetPosition (long lOff, int nFrom);
����������Moves the stream I/O pointer to the specified position.
long GetPosition ();
����������Returns a current position of the stream I/O pointer.

Constructor/Destructor Detail

~IUnicodeStream

virtual ~IUnicodeStream();

Destroys the Unicode character stream.

Function Detail

Read

virtual int Read(WCHAR *pBuf, int nCount);

Reads the specified number of characters into the specified buffer from this stream.

The number of characters actually read may be less than the number of characters requested.

Parameters:
pBuf - the buffer to hold result
nCount - the number of characters to read
Returns:
the number of characters actually read; the negative integer if read error occured

Write

virtual void Write(const WCHAR *pBuf, int nCount);

Writes the specified number of characters from the specified buffer to this stream.

Parameters:
pBuf - the buffer to write
nCount - the number of characters to write

SetPosition

virtual void SetPosition(long lOff, int nFrom);

Moves the stream I/O pointer to the specified position.

The stream I/O pointer is positioned relatively to the origin. The origin is specified using the origin code; allowed values are: begin for beginning of the stream, current for current position of the stream I/O pointer, and end for end of the stream.

Parameters:
lOff - the relative position
nFrom - the origin code

GetPosition

virtual long GetPosition();

Returns a current position of the stream I/O pointer.

Returns:
the current position of the stream I/O pointer

Unicorn XML Toolkit
Version 1.50.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.