Panda3D
Public Member Functions

StreamWrapper Class Reference

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

Inheritance diagram for StreamWrapper:
IStreamWrapper OStreamWrapper StreamWrapperBase StreamWrapperBase

List of all members.

Public Member Functions

 StreamWrapper (iostream stream)
 acquire ()
 Acquires the internal lock.
 acquire ()
 Acquires the internal lock.
iostream getIostream ()
 Returns the iostream this object is wrapping.
istream getIstream ()
 Returns the istream this object is wrapping.
ostream getOstream ()
 Returns the ostream this object is wrapping.
 release ()
 Releases the internal lock.
 release ()
 Releases the internal lock.

Detailed Description

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


Constructor & Destructor Documentation

StreamWrapper ( iostream  stream)

Member Function Documentation

acquire ( ) [inherited]

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.

acquire ( ) [inherited]

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.

iostream getIostream ( )

Returns the iostream this object is wrapping.

istream getIstream ( ) [inherited]

Returns the istream this object is wrapping.

ostream getOstream ( ) [inherited]

Returns the ostream this object is wrapping.

release ( ) [inherited]

Releases the internal lock.

Must be called exactly once following a call to acquire(). See the cautions with acquire().

release ( ) [inherited]

Releases the internal lock.

Must be called exactly once following a call to acquire(). See the cautions with acquire().

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties