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

An istream object that presents a subwindow into another istream. The first character read from this stream will be the "start" character from the source istream; just before the file pointer reaches the "end" character, eof is returned. More...

Inheritance diagram for ISubStream:
Istream Ios IosBase

Public Member Functions

 __init__ ()
 
 __init__ (IStreamWrapper source, Ios::Streampos start, Ios::Streampos end)
 
ISubStream close ()
 Resets the SubStream to empty, but does not actually close the source istream. More...
 
ISubStream open (IStreamWrapper source, Ios::Streampos start, Ios::Streampos end)
 Starts the SubStream reading from the indicated source, with the first character being the character at position "start" within the source, for end - start total characters. The character at "end" within the source will never be read; this will appear to be EOF. More...
 
- Public Member Functions inherited from Istream
int get ()
 
 seekg (Ios::Streamoff off, IosBase::Seekdir dir)
 
 seekg (Ios::Streampos pos)
 
Ios::Streampos tellg ()
 
- Public Member Functions inherited from Ios
bool bad ()
 
 clear ()
 
bool eof ()
 
bool fail ()
 
bool good ()
 

Additional Inherited Members

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

Detailed Description

An istream object that presents a subwindow into another istream. The first character read from this stream will be the "start" character from the source istream; just before the file pointer reaches the "end" character, eof is returned.

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

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( IStreamWrapper  source,
Ios::Streampos  start,
Ios::Streampos  end 
)

◆ close()

ISubStream close ( )

Resets the SubStream to empty, but does not actually close the source istream.

◆ open()

ISubStream open ( IStreamWrapper  source,
Ios::Streampos  start,
Ios::Streampos  end 
)

Starts the SubStream reading from the indicated source, with the first character being the character at position "start" within the source, for end - start total characters. The character at "end" within the source will never be read; this will appear to be EOF.

If end is zero, it indicates that the ISubStream will continue until the end of the source stream.