Panda3D
 All Classes Functions Variables Enumerations
Public Member Functions | List of all members
StreamWrapper Class Reference

This class provides a locking wrapper around a combination ostream/istream pointer. More...

#include "streamWrapper.h"

Inheritance diagram for StreamWrapper:
IStreamWrapper OStreamWrapper StreamWrapperBase StreamWrapperBase

Public Member Functions

 StreamWrapper (iostream *stream, bool owns_pointer, bool stringstream_hack=false)
 
 StreamWrapper (iostream &stream)
 
iostream * get_iostream () const
 Returns the iostream this object is wrapping. More...
 
- Public Member Functions inherited from IStreamWrapper
 IStreamWrapper (istream *stream, bool owns_pointer)
 
 IStreamWrapper (istream &stream)
 
int get ()
 Atomically reads a single character from the stream. More...
 
istream * get_istream () const
 Returns the istream this object is wrapping. More...
 
void read (char *buffer, streamsize num_bytes)
 Atomically reads a number of bytes from the stream, without error detection. More...
 
void read (char *buffer, streamsize num_bytes, streamsize &read_bytes)
 Atomically reads a number of bytes from the stream. More...
 
void read (char *buffer, streamsize num_bytes, streamsize &read_bytes, bool &eof)
 Atomically reads a number of bytes from the stream. More...
 
streamsize seek_gpos_eof ()
 Atomically seeks to EOF and returns the gpos there; that is, returns the file size. More...
 
void seek_read (streamsize pos, char *buffer, streamsize num_bytes, streamsize &read_bytes, bool &eof)
 Atomically seeks to a particular offset from the beginning of the file, and reads a number of bytes from the stream. More...
 
- Public Member Functions inherited from StreamWrapperBase
void acquire ()
 Acquires the internal lock. More...
 
void release ()
 Releases the internal lock. More...
 
- Public Member Functions inherited from OStreamWrapper
 OStreamWrapper (ostream *stream, bool owns_pointer, bool stringstream_hack=false)
 
 OStreamWrapper (ostream &stream)
 
ostream * get_ostream () const
 Returns the ostream this object is wrapping. More...
 
bool put (char c)
 Atomically writes a single character to the stream. More...
 
void seek_eof_write (const char *buffer, streamsize num_bytes, bool &fail)
 Atomically seeks to the end of the file, and writes a number of bytes to the stream. More...
 
streamsize seek_ppos_eof ()
 Atomically seeks to EOF and returns the ppos there; that is, returns the file size. More...
 
void seek_write (streamsize pos, const char *buffer, streamsize num_bytes, bool &fail)
 Atomically seeks to a particular offset from the beginning of the file, and writes a number of bytes to the stream. More...
 
void write (const char *buffer, streamsize num_bytes)
 Atomically writes a number of bytes to the stream, without error detection. More...
 
void write (const char *buffer, streamsize num_bytes, bool &fail)
 Atomically writes a number of bytes to the stream. More...
 

Detailed Description

This class provides a locking wrapper around a combination ostream/istream pointer.

Definition at line 118 of file streamWrapper.h.

Member Function Documentation

iostream * StreamWrapper::get_iostream ( ) const
inline

Returns the iostream this object is wrapping.

Definition at line 212 of file streamWrapper.I.


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