Panda3D
Public Member Functions | List of all members
OSubStream Class Reference

An ostream object that presents a subwindow into another ostream. More...

Inheritance diagram for OSubStream:
Ostream BasicIosChar IosBase

Public Member Functions

 __init__ ()
 
 __init__ (OStreamWrapper dest, Streamoff start, Streamoff end, bool append)
 
OSubStream close ()
 Resets the SubStream to empty, but does not actually close the dest ostream. More...
 
OSubStream open (OStreamWrapper dest, Streamoff start, Streamoff end, bool append)
 Starts the SubStream reading from the indicated dest, with the first character being the character at position "start" within the dest, for end. More...
 
- Public Member Functions inherited from Ostream
 flush ()
 
 put (char c)
 
 seekp (Streamoff pos)
 
 seekp (Streamoff off, IosBase::Seekdir dir)
 
Streamoff tellp ()
 
- Public Member Functions inherited from BasicIosChar
bool bad ()
 
 clear ()
 
bool eof ()
 
bool fail ()
 
bool good ()
 

Additional Inherited Members

- Public Types inherited from IosBase
enum  Iostate
 
enum  Openmode
 
enum  Seekdir { beg = 0, cur = 1, end = 2 }
 

Detailed Description

An ostream object that presents a subwindow into another ostream.

The first character written to this stream will be the "start" character in the dest istream; no characters may be written to character "end" or later (unless end is zero).

The dest stream must be one that we can randomly seek within. The resulting OSubStream will also support arbitrary seeks.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( OStreamWrapper  dest,
Streamoff  start,
Streamoff  end,
bool  append 
)

◆ close()

OSubStream close ( )

Resets the SubStream to empty, but does not actually close the dest ostream.

◆ open()

OSubStream open ( OStreamWrapper  dest,
Streamoff  start,
Streamoff  end,
bool  append 
)

Starts the SubStream reading from the indicated dest, with the first character being the character at position "start" within the dest, for end.

  • start total characters. The character at "end" within the dest will never be read; this will appear to be EOF.

If end is zero, it indicates that the OSubStream will continue until the end of the dest stream.