Panda3D
Public Member Functions | Public Attributes | 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 (std::iostream *stream, bool owns_pointer, bool stringstream_hack=false)
 
 StreamWrapper (std::iostream &stream)
 
std::iostream * get_iostream () const
 
- Public Member Functions inherited from IStreamWrapper
 IStreamWrapper (std::istream *stream, bool owns_pointer)
 
 IStreamWrapper (std::istream &stream)
 
int get ()
 Atomically reads a single character from the stream. More...
 
std::istream * get_istream () const
 
void read (char *buffer, std::streamsize num_bytes)
 
void read (char *buffer, std::streamsize num_bytes, std::streamsize &read_bytes)
 
void read (char *buffer, std::streamsize num_bytes, std::streamsize &read_bytes, bool &eof)
 
std::streamsize seek_gpos_eof ()
 Atomically seeks to EOF and returns the gpos there; that is, returns the file size. More...
 
void seek_read (std::streamsize pos, char *buffer, std::streamsize num_bytes, std::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 ref () const
 Increments the reference count. More...
 
void release ()
 Releases the internal lock. More...
 
bool unref () const
 Decrements the reference count. More...
 
- Public Member Functions inherited from OStreamWrapper
 OStreamWrapper (std::ostream *stream, bool owns_pointer, bool stringstream_hack=false)
 
 OStreamWrapper (std::ostream &stream)
 
std::ostream * get_ostream () const
 
bool put (char c)
 Atomically writes a single character to the stream. More...
 
void seek_eof_write (const char *buffer, std::streamsize num_bytes, bool &fail)
 Atomically seeks to the end of the file, and writes a number of bytes to the stream. More...
 
std::streamsize seek_ppos_eof ()
 Atomically seeks to EOF and returns the ppos there; that is, returns the file size. More...
 
void seek_write (std::streamsize pos, const char *buffer, std::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, std::streamsize num_bytes)
 
void write (const char *buffer, std::streamsize num_bytes, bool &fail)
 

Public Attributes

 get_iostream
 Returns the iostream this object is wrapping. More...
 
- Public Attributes inherited from IStreamWrapper
 get_istream
 Returns the istream this object is wrapping. More...
 
- Public Attributes inherited from OStreamWrapper
 get_ostream
 Returns the ostream this object is wrapping. More...
 

Detailed Description

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

Definition at line 122 of file streamWrapper.h.

Member Data Documentation

◆ get_iostream

std::iostream * StreamWrapper::get_iostream
inline

Returns the iostream this object is wrapping.

Definition at line 130 of file streamWrapper.h.


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