Open CASCADE Technology
7.7.0
|
Substitution of IStream for shape reader for fast management of position in the file (get and go) and operation on all reading types. More...
#include <BinTools_IStream.hxx>
Public Member Functions | |
BinTools_IStream (Standard_IStream &theStream) | |
Creates IStream using the current stream IStream. More... | |
BinTools_ObjectType | ReadType () |
Reads and returns the type. More... | |
const BinTools_ObjectType & | LastType () |
Returns the last read type. More... | |
TopAbs_ShapeEnum | ShapeType () |
Returns the shape type by the last retrieved type. More... | |
TopAbs_Orientation | ShapeOrientation () |
Returns the shape orientation by the last retrieved type. More... | |
uint64_t | Position () |
Returns the current position in the stream. More... | |
void | GoTo (const uint64_t &thePosition) |
Moves the current stream position to the given one. More... | |
Standard_Boolean | IsReference () |
Returns true if the last restored type is one of a reference. More... | |
uint64_t | ReadReference () |
Reads a reference IStream using the last restored type. More... | |
Standard_IStream & | Stream () |
Returns the original IStream. More... | |
void | UpdatePosition () |
Makes up to date the myPosition because myStream was used outside and position is changed. More... | |
operator bool () const | |
Returns false if stream reading is failed. More... | |
Standard_Real | ReadReal () |
Reads real value from the stream. More... | |
BinTools_IStream & | operator>> (Standard_Real &theValue) |
Standard_Integer | ReadInteger () |
Reads integer value from the stream. More... | |
BinTools_IStream & | operator>> (Standard_Integer &theValue) |
gp_Pnt | ReadPnt () |
Reads point coordinates value from the stream. More... | |
BinTools_IStream & | operator>> (gp_Pnt &theValue) |
Standard_Byte | ReadByte () |
Reads byte value from the stream. More... | |
BinTools_IStream & | operator>> (Standard_Byte &theValue) |
Standard_Boolean | ReadBool () |
Reads boolean value from the stream (stored as one byte). More... | |
BinTools_IStream & | operator>> (Standard_Boolean &theValue) |
Standard_ShortReal | ReadShortReal () |
Reads short real value from the stream. More... | |
BinTools_IStream & | operator>> (Standard_ShortReal &theValue) |
BinTools_IStream & | operator>> (gp_Trsf &theValue) |
Reads transformation value from the stream. More... | |
void | ReadBools (Standard_Boolean &theBool1, Standard_Boolean &theBool2, Standard_Boolean &theBool3) |
Reads 3 boolean values from one byte. More... | |
void | ReadBools (Standard_Boolean &theBool1, Standard_Boolean &theBool2, Standard_Boolean &theBool3, Standard_Boolean &theBool4, Standard_Boolean &theBool5, Standard_Boolean &theBool6, Standard_Boolean &theBool7) |
Reads 7 boolean values from one byte. More... | |
Substitution of IStream for shape reader for fast management of position in the file (get and go) and operation on all reading types.
BinTools_IStream::BinTools_IStream | ( | Standard_IStream & | theStream | ) |
Creates IStream using the current stream IStream.
void BinTools_IStream::GoTo | ( | const uint64_t & | thePosition | ) |
Moves the current stream position to the given one.
Standard_Boolean BinTools_IStream::IsReference | ( | ) |
Returns true if the last restored type is one of a reference.
|
inline |
Returns the last read type.
BinTools_IStream::operator bool | ( | ) | const |
Returns false if stream reading is failed.
BinTools_IStream& BinTools_IStream::operator>> | ( | Standard_Real & | theValue | ) |
BinTools_IStream& BinTools_IStream::operator>> | ( | Standard_Integer & | theValue | ) |
BinTools_IStream& BinTools_IStream::operator>> | ( | gp_Pnt & | theValue | ) |
BinTools_IStream& BinTools_IStream::operator>> | ( | Standard_Byte & | theValue | ) |
|
inline |
BinTools_IStream& BinTools_IStream::operator>> | ( | Standard_ShortReal & | theValue | ) |
BinTools_IStream& BinTools_IStream::operator>> | ( | gp_Trsf & | theValue | ) |
Reads transformation value from the stream.
|
inline |
Returns the current position in the stream.
|
inline |
Reads boolean value from the stream (stored as one byte).
void BinTools_IStream::ReadBools | ( | Standard_Boolean & | theBool1, |
Standard_Boolean & | theBool2, | ||
Standard_Boolean & | theBool3 | ||
) |
Reads 3 boolean values from one byte.
void BinTools_IStream::ReadBools | ( | Standard_Boolean & | theBool1, |
Standard_Boolean & | theBool2, | ||
Standard_Boolean & | theBool3, | ||
Standard_Boolean & | theBool4, | ||
Standard_Boolean & | theBool5, | ||
Standard_Boolean & | theBool6, | ||
Standard_Boolean & | theBool7 | ||
) |
Reads 7 boolean values from one byte.
|
inline |
Reads byte value from the stream.
|
inline |
Reads integer value from the stream.
|
inline |
Reads point coordinates value from the stream.
|
inline |
Reads real value from the stream.
uint64_t BinTools_IStream::ReadReference | ( | ) |
Reads a reference IStream using the last restored type.
|
inline |
Reads short real value from the stream.
BinTools_ObjectType BinTools_IStream::ReadType | ( | ) |
Reads and returns the type.
TopAbs_Orientation BinTools_IStream::ShapeOrientation | ( | ) |
Returns the shape orientation by the last retrieved type.
TopAbs_ShapeEnum BinTools_IStream::ShapeType | ( | ) |
Returns the shape type by the last retrieved type.
|
inline |
Returns the original IStream.
|
inline |
Makes up to date the myPosition because myStream was used outside and position is changed.