# StreamWrapper

from pandac.PandaModules import StreamWrapper

Class : StreamWrapper
Description : This class provides a locking wrapper around a combination ostream/istream pointer.

## Inheritance:

StreamWrapper: IStreamWrapper OStreamWrapper
IStreamWrapper: StreamWrapperBase
StreamWrapperBase:
OStreamWrapper: StreamWrapperBase

## Methods of StreamWrapper:

StreamWrapper (Constructor)
getIostream

## Methods of IStreamWrapper:

IStreamWrapper (Constructor)
getIstream

## Methods of StreamWrapperBase:

acquire
release

## Methods of OStreamWrapper:

OStreamWrapper (Constructor)
getOstream

StreamWrapper StreamWrapper::StreamWrapper(iostream &stream); Description:

getIostream iostream *StreamWrapper::get_iostream(void) const; Description: Returns the iostream this object is wrapping.

IStreamWrapper IStreamWrapper::IStreamWrapper(istream &stream); Description:

getIstream istream *IStreamWrapper::get_istream(void) const; Description: Returns the istream this object is wrapping.

acquire void StreamWrapperBase::acquire(void); Description: Acquires the internal lock. User code should call this to take temporary possession of the stream and perform direct I/O operations on it, for instance to make several sequential atomic reads. You may not call any of the StreamWrapper methods while the lock is held, other than release(). Use with extreme caution! This is a very low-level, non-recursive lock. You must call acquire() only once, and you must later call release() exactly once. Failing to do so may result in a hard deadlock with no available debugging features.

release void StreamWrapperBase::release(void); Description: Releases the internal lock. Must be called exactly once following a call to acquire(). See the cautions with acquire().

OStreamWrapper OStreamWrapper::OStreamWrapper(ostream &stream); Description:

getOstream ostream *OStreamWrapper::get_ostream(void) const; Description: Returns the ostream this object is wrapping.