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

Provides the basic operations common to all object file stream I/O. More...

#include <owl/objstrm.h>

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

Public Types

enum  { openprot = 0666 }
 
- Public Types inherited from owl::pstream
enum  PointerTypes { ptNull , ptIndexed , ptObject }
 Enumerates object pointer types. More...
 

Public Member Functions

 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.
 

Additional Inherited Members

- 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 Attributes inherited from owl::pstream
std::streambuf * bp
 
int state
 

Detailed Description

Provides the basic operations common to all object file stream I/O.

Base class for handling streamable objects on file streams.

It is a base class for handling streamable objects on file streams.

Definition at line 548 of file objstrm.h.

Member Enumeration Documentation

◆ anonymous enum

Enumerator
openprot 

Definition at line 551 of file objstrm.h.

Member Function Documentation

◆ close()

void owl::fpbase::close ( )

Closes the stream and associated file.

Definition at line 933 of file objstrm.cpp.

References owl::pstream::clear().

◆ open() [1/2]

void owl::fpbase::open ( LPCSTR b,
int m,
int = openprot )

Opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.

The opened file is attached to this stream.

Definition at line 909 of file objstrm.cpp.

References owl::pstream::clear().

◆ open() [2/2]

void owl::fpbase::open ( LPCWSTR b,
int m,
int = openprot )

Opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, or noreplace) and protection.

The opened file is attached to this stream.

Definition at line 922 of file objstrm.cpp.

References owl::pstream::clear().

◆ setbuf()

void owl::fpbase::setbuf ( LPSTR b,
int len )

Sets the location of the buffer to buf and the buffer size to len.

Definition at line 942 of file objstrm.cpp.

References owl::pstream::clear().


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