OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::ifpstream Class Reference

ifpstream is a simple "mix" of its bases, fpbase and ipstream. More...

#include <owl/objstrm.h>

Inheritance diagram for owl::ifpstream:
owl::fpbase owl::ipstream owl::pstream owl::pstream

Public Member Functions

 ifpstream ()
 Creates a buffered ifpstream object using a default buffer.
 
 ifpstream (LPCSTR, int=std::ios::in, int=fpbase::openprot)
 Creates a buffered ifpstream object.
 
 ifpstream (LPCWSTR, int=std::ios::in, int=fpbase::openprot)
 Creates a buffered ifpstream object.
 
std::filebuf * rdbuf ()
 Returns a pointer to the current file buffer.
 
void open (LPCSTR, int=std::ios::in, int=fpbase::openprot)
 It opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.
 
void open (LPCWSTR, int=std::ios::in, int=fpbase::openprot)
 It opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.
 
- Public Member Functions inherited from owl::fpbase
 fpbase ()
 Creates a buffered fpbase object.
 
 fpbase (LPCSTR, int, int=openprot)
 Creates a buffered fpbase object.
 
 fpbase (LPCWSTR, int, int=openprot)
 Creates a buffered fpbase object.
 
void open (LPCSTR, int, int=openprot)
 Opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.
 
void open (LPCWSTR, int, int=openprot)
 Opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.
 
void close ()
 Closes the stream and associated file.
 
void setbuf (LPSTR, int)
 Sets the location of the buffer to buf and the buffer size to len.
 
std::filebuf * rdbuf ()
 Returns a pointer to the current file buffer.
 
- Public Member Functions inherited from owl::pstream
 pstream (std::streambuf *)
 Creates a buffered pstream with the given buffer. The state is set to 0.
 
virtual ~pstream ()
 
int rdstate () const
 Returns the current state value.
 
int eof () const
 Returns nonzero on end of stream.
 
int fail () const
 Returns nonzero if a previous stream operation failed.
 
int bad () const
 Returns nonzero if an error occurs.
 
int good () const
 Returns nonzero if no error states have been recorded for the stream (that is, no errors have occurred).
 
void clear (int=0)
 Sets the stream state to the given value (defaults to 0).
 
 operator void * () const
 Converts to a void pointer.
 
int operator! () const
 Overloads the NOT operator.
 
std::streambuf * rdbuf () const
 Returns the pb pointer to the buffer assigned to the stream.
 
- Public Member Functions inherited from owl::ipstream
 ipstream (std::streambuf *)
 Creates a buffered ipstream with the given buffer. The state is set to 0.
 
std::streampos tellg ()
 Returns the (absolute) current stream position.
 
ipstreamseekg (std::streampos)
 
ipstreamseekg (std::streamoff, std::ios::seekdir)
 
uint8 readByte ()
 Returns the byte at the current stream position.
 
void readBytes (void *, size_t)
 Reads sz bytes from current stream position, and writes them to data.
 
void freadBytes (void *data, size_t sz)
 Reads the number of bytes specified by sz into the supplied buffer (data).
 
uint32 readWord ()
 Returns the word at the current stream position.
 
uint16 readWord16 ()
 Returns the 16-bit word at the current stream position.
 
uint32 readWord32 ()
 Returns the 32-bit word at the current stream position.
 
LPSTR readString ()
 Allocates a buffer large enough to contain the string at the current stream position and reads the string into the buffer.
 
LPSTR readString (LPSTR, unsigned)
 Reads the string at the current stream position into the buffer specified by buf.
 
charfreadString ()
 Reads a string from the stream.
 
charfreadString (char *buf, unsigned maxLen)
 Reads a string from the stream into the supplied far buffer (buf).
 
uint32 getVersion () const
 Returns the object version number.
 
TStreamableBasereadObject (TStreamableBase *&mem, ModuleId mid=GetModuleId())
 
TStreamableBasereadObjectPointer (TStreamableBase *&mem, ModuleId mid=GetModuleId())
 
TStreamableBasefind (P_id_type)
 Returns a pointer to the object corresponding to Id.
 
void registerObject (TStreamableBase *adr)
 Registers the object pointed to by adr.
 

Additional Inherited Members

- Public Types inherited from owl::fpbase
enum  { openprot = 0666 }
 
- Public Types inherited from owl::pstream
enum  PointerTypes { ptNull , ptIndexed , ptObject }
 Enumerates object pointer types. More...
 
- Protected Member Functions inherited from owl::pstream
 pstream ()
 Creates a pstream without initializing the buffer pointer bp or state.
 
void init (std::streambuf *)
 The init member function initializes the stream and sets state to 0 and bp to sbp.
 
void setstate (int)
 Updates the state data member with state |= (b & 0xFF).
 
- Protected Member Functions inherited from owl::ipstream
 ipstream ()
 Creates a buffered ipstream without initializing the buffer pointer, bp.
 
const ObjectBuilderreadPrefix (ModuleId mid)
 Returns the TStreamableClass object corresponding to the class name stored at the current position in the stream.
 
void readData (const ObjectBuilder *, TStreamableBase *&)
 If mem is 0, it calls the appropriate build function to allocate memory and initialize the virtual table pointer for the object.
 
void readSuffix ()
 Reads and checks the suffix of the object.
 
void readVersion ()
 Reads the version number of the input stream.
 
- Protected Attributes inherited from owl::pstream
std::streambuf * bp
 
int state
 

Detailed Description

ifpstream is a simple "mix" of its bases, fpbase and ipstream.

Base class for reading streamable objects from file streams.

It provides the base class reading (extracting) streamable objects from file streams.

Definition at line 574 of file objstrm.h.


The documentation for this class was generated from the following file: