CPGFFileStream(3) | Library Functions Manual | CPGFFileStream(3) |
NAME¶
CPGFFileStream - File stream class.
SYNOPSIS¶
#include <PGFstream.h>
Inherits CPGFStream.
Public Member Functions¶
CPGFFileStream ()
CPGFFileStream (HANDLE hFile)
HANDLE GetHandle ()
virtual ~CPGFFileStream ()
virtual void Write (int *count, void *buffer)
virtual void Read (int *count, void *buffer)
virtual void SetPos (short posMode, INT64 posOff)
virtual UINT64 GetPos () const
virtual bool IsValid () const
Protected Attributes¶
HANDLE m_hFile
file handle
Detailed Description¶
File stream class.
A PGF stream subclass for external storage files.
Author
Definition at line 82 of file PGFstream.h.
Constructor & Destructor Documentation¶
CPGFFileStream::CPGFFileStream () [inline]¶
Definition at line 87 of file PGFstream.h..PP
87 : m_hFile(0) {}
CPGFFileStream::CPGFFileStream (HANDLE hFile) [inline]¶
Constructor
Parameters
Definition at line 90 of file PGFstream.h..PP
90 : m_hFile(hFile) {}
virtual CPGFFileStream::~CPGFFileStream () [inline], [virtual]¶
Definition at line 94 of file PGFstream.h..PP
94 { m_hFile = 0; }
Member Function Documentation¶
HANDLE CPGFFileStream::GetHandle () [inline]¶
Returns
Definition at line 92 of file PGFstream.h..PP
92 { return m_hFile; }
UINT64 CPGFFileStream::GetPos () const [virtual]¶
Get current stream position.
Returns
Implements CPGFStream.
Definition at line 64 of file PGFstream.cpp..PP
64 { 65 ASSERT(IsValid()); 66 OSError err; 67 UINT64 pos = 0; 68 if ((err = GetFPos(m_hFile, &pos)) != NoError) ReturnWithError2(err, pos); 69 return pos; 70 }
virtual bool CPGFFileStream::IsValid () const [inline], [virtual]¶
Check stream validity.
Returns
Implements CPGFStream.
Definition at line 99 of file PGFstream.h..PP
99 { return m_hFile != 0; }
void CPGFFileStream::Read (int * count, void * buffer) [virtual]¶
Read some bytes from this stream and stores them into a buffer.
Parameters
buffer A memory buffer
Implements CPGFStream.
Definition at line 48 of file PGFstream.cpp..PP
48 { 49 ASSERT(count); 50 ASSERT(buffPtr); 51 ASSERT(IsValid()); 52 OSError err; 53 if ((err = FileRead(m_hFile, count, buffPtr)) != NoError) ReturnWithError(err); 54 }
void CPGFFileStream::SetPos (short posMode, INT64 posOff) [virtual]¶
Set stream position either absolute or relative.
Parameters
posOff A new stream position (absolute positioning) or a position offset (relative positioning)
Implements CPGFStream.
Definition at line 57 of file PGFstream.cpp..PP
57 { 58 ASSERT(IsValid()); 59 OSError err; 60 if ((err = SetFPos(m_hFile, posMode, posOff)) != NoError) ReturnWithError(err); 61 }
void CPGFFileStream::Write (int * count, void * buffer) [virtual]¶
Write some bytes out of a buffer into this stream.
Parameters
buffer A memory buffer
Implements CPGFStream.
Definition at line 38 of file PGFstream.cpp..PP
38 { 39 ASSERT(count); 40 ASSERT(buffPtr); 41 ASSERT(IsValid()); 42 OSError err; 43 if ((err = FileWrite(m_hFile, count, buffPtr)) != NoError) ReturnWithError(err); 44 45 }
Member Data Documentation¶
HANDLE CPGFFileStream::m_hFile [protected]¶
file handle
Definition at line 84 of file PGFstream.h.
Author¶
Generated automatically by Doxygen for libpgf from the source code.
Version 7.21.2 | libpgf |