Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLDataSource Class Reference

This is a base class for a source of picture data. More...

#include <pldatasrc.h>

Inheritance diagram for PLDataSource:

Inheritance graph
[legend]
Collaboration diagram for PLDataSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLDataSource (PLIProgressNotification *pNotification=NULL)
virtual ~PLDataSource ()
virtual void Open (const char *pszName, int FileSize)
virtual void Close ()
char * GetName ()
virtual PLBYTEGetBufferPtr (int MinBytesInBuffer)=0
 Read but don't advance file pointer.
virtual PLBYTEReadNBytes (int n)
 This needs to be overridden in derived classes.
int GetFileSize ()
virtual PLBYTEReadEverything ()=0
 This is a legacy routine that interferes with progress notifications.
PLBYTERead1Byte ()
PLBYTERead2Bytes ()
PLBYTERead4Bytes ()
void OProgressNotification (double part)
 handles progress notification from other libs
void AlignToWord ()
void Skip (int n)
void CheckEOF ()
 Test to see if we didn't go past the end of the file.

Private Attributes

char * m_pszName
int m_FileSize
int m_BytesRead
bool m_bSrcLSBFirst
PLIProgressNotificationm_pNotification

Detailed Description

This is a base class for a source of picture data.

It defines methods to open, close, and read from data sources. Does byte-order-conversions in the ReadByte, ReadWord, and ReadLong routines.

Definition at line 23 of file pldatasrc.h.


Constructor & Destructor Documentation

PLDataSource::PLDataSource PLIProgressNotification pNotification = NULL  ) 
 

Definition at line 22 of file pldatasrc.cpp.

PLDataSource::~PLDataSource  )  [virtual]
 

Definition at line 38 of file pldatasrc.cpp.


Member Function Documentation

void PLDataSource::AlignToWord  )  [inline]
 

Definition at line 141 of file pldatasrc.h.

void PLDataSource::CheckEOF  )  [inline]
 

Test to see if we didn't go past the end of the file.

Definition at line 156 of file pldatasrc.h.

References PL_ERREND_OF_FILE.

void PLDataSource::Close  )  [virtual]
 

Reimplemented in PLFileSource, and PLMemSource.

Definition at line 59 of file pldatasrc.cpp.

Referenced by PLMemSource::Close(), and PLFileSource::Close().

virtual PLBYTE* PLDataSource::GetBufferPtr int  MinBytesInBuffer  )  [pure virtual]
 

Read but don't advance file pointer.

Implemented in PLFileSource, and PLMemSource.

Referenced by PLAnyPicDecoder::MakeBmp().

int PLDataSource::GetFileSize  )  [inline]
 

Definition at line 115 of file pldatasrc.h.

Referenced by PLTIFFDecoderEx::Associate(), PLTIFFDecoder::DoDecode(), and PLAnyPicDecoder::MakeBmp().

char * PLDataSource::GetName  ) 
 

Definition at line 70 of file pldatasrc.cpp.

Referenced by PLAnyPicDecoder::MakeBmp().

void PLDataSource::Open const char *  pszName,
int  FileSize
[virtual]
 

Definition at line 44 of file pldatasrc.cpp.

References PLASSERT.

Referenced by PLMemSource::Open(), and PLFileSource::Open().

void PLDataSource::OProgressNotification double  part  ) 
 

handles progress notification from other libs

Definition at line 90 of file pldatasrc.cpp.

Referenced by PLJPEGDecoder::JNotification().

PLBYTE * PLDataSource::Read1Byte  )  [inline]
 

Definition at line 121 of file pldatasrc.h.

PLBYTE * PLDataSource::Read2Bytes  )  [inline]
 

Definition at line 128 of file pldatasrc.h.

PLBYTE * PLDataSource::Read4Bytes  )  [inline]
 

Definition at line 135 of file pldatasrc.h.

virtual PLBYTE* PLDataSource::ReadEverything  )  [pure virtual]
 

This is a legacy routine that interferes with progress notifications.

Don't call it!

Implemented in PLFileSource, and PLMemSource.

Referenced by PLTIFFDecoderEx::Associate(), and PLTIFFDecoder::DoDecode().

PLBYTE * PLDataSource::ReadNBytes int  n  )  [virtual]
 

This needs to be overridden in derived classes.

Reimplemented in PLFileSource, and PLMemSource.

Definition at line 76 of file pldatasrc.cpp.

Referenced by PLPCXDecoder::DoDecode(), GIF_Read_Data(), PLAnyPicDecoder::MakeBmp(), my_read_data(), PLMemSource::ReadNBytes(), and PLFileSource::ReadNBytes().

void PLDataSource::Skip int  n  )  [inline]
 

Definition at line 149 of file pldatasrc.h.


Member Data Documentation

bool PLDataSource::m_bSrcLSBFirst [private]
 

Definition at line 108 of file pldatasrc.h.

int PLDataSource::m_BytesRead [private]
 

Definition at line 107 of file pldatasrc.h.

int PLDataSource::m_FileSize [private]
 

Definition at line 106 of file pldatasrc.h.

PLIProgressNotification* PLDataSource::m_pNotification [private]
 

Definition at line 110 of file pldatasrc.h.

char* PLDataSource::m_pszName [private]
 

Definition at line 104 of file pldatasrc.h.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:20:59 2004 for vuVolume by  doxygen 1.3.9.1