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

Provides the base class for writing (inserting) streamable objects to file streams. More...

#include <owl/objstrm.h>

Inheritance diagram for owl::ofpstream:
owl::fpbase owl::opstream owl::pstream owl::pstream

Public Member Functions

 ofpstream ()
 Creates a buffered ofpstream object using a default buffer.
 
 ofpstream (LPCSTR, int=std::ios::out, int=fpbase::openprot)
 Creates a buffered ofpstream object.
 
 ofpstream (LPCWSTR, int=std::ios::out, int=fpbase::openprot)
 Creates a buffered ofpstream object.
 
std::filebuf * rdbuf ()
 
void open (LPCSTR, int=std::ios::out, int=fpbase::openprot)
 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::out, int=fpbase::openprot)
 Returns a pointer to the current file buffer.
 
- 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::opstream
 opstream (std::streambuf *)
 
virtual ~opstream ()
 
std::streampos tellp ()
 Returns the (absolute) current stream position.
 
opstreamseekp (std::streampos)
 
opstreamseekp (std::streamoff, std::ios::seekdir)
 
opstreamflush ()
 Flushes the stream.
 
void writeByte (uint8)
 Writes the byte ch to the stream.
 
void writeBytes (const void *, size_t)
 Writes sz bytes from the data buffer to the stream.
 
void fwriteBytes (const void *data, size_t sz)
 Writes the specified number of bytes (sz) from the supplied buffer (data) to the stream.
 
void writeWord (uint32)
 Writes the 32-bit word us to the stream.
 
void writeWord16 (uint16)
 Writes the 16-bit word us to the stream.
 
void writeWord32 (uint32)
 Writes the 32-bit word us to the stream.
 
void writeString (const char *)
 Writes str to the stream.
 
void fwriteString (const char *str)
 Writes the specified far character string (str) to the stream.
 
void writeObject (const TStreamableBase *t, int isPtr=0, ModuleId mid=GetModuleId())
 Writes the object, pointed to by t, to the output stream.
 
void writeObjectPointer (const TStreamableBase *t, ModuleId mid=GetModuleId())
 Writes the object pointer t to the output stream.
 
P_id_type findObject (TStreamableBase *adr)
 Returns the type ID for the object pointed to by adr.
 
void registerObject (TStreamableBase *adr)
 Registers the class of the object pointed to by adr.
 
P_id_type findVB (TStreamableBase *adr)
 Returns a pointer to the virtual base.
 
void registerVB (TStreamableBase *adr)
 Registers a virtual base class.
 

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::opstream
 opstream ()
 Creates a buffered opstream with the given buffer and sets the bp data member to buf.
 
void writePrefix (const TStreamableBase *)
 Writes the class name prefix to the stream.
 
void writeData (const TStreamableBase *, ModuleId mid)
 Writes data to the stream by calling the write member function of the appropriate class for the object being written.
 
void writeSuffix (const TStreamableBase *)
 Writes the class name suffix to the stream.
 
void writeVersion ()
 
- Protected Attributes inherited from owl::pstream
std::streambuf * bp
 
int state
 

Detailed Description

Provides the base class for writing (inserting) streamable objects to file streams.

Base class for writing streamable objects to file streams.

Definition at line 605 of file objstrm.h.


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