Open CASCADE Technology 7.8.0
Public Member Functions
BinTools_IStream Class Reference

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.
 
BinTools_ObjectType ReadType ()
 Reads and returns the type.
 
const BinTools_ObjectTypeLastType ()
 Returns the last read type.
 
TopAbs_ShapeEnum ShapeType ()
 Returns the shape type by the last retrieved type.
 
TopAbs_Orientation ShapeOrientation ()
 Returns the shape orientation by the last retrieved type.
 
uint64_t Position ()
 Returns the current position in the stream.
 
void GoTo (const uint64_t &thePosition)
 Moves the current stream position to the given one.
 
Standard_Boolean IsReference ()
 Returns true if the last restored type is one of a reference.
 
uint64_t ReadReference ()
 Reads a reference IStream using the last restored type.
 
Standard_IStreamStream ()
 Returns the original IStream.
 
void UpdatePosition ()
 Makes up to date the myPosition because myStream was used outside and position is changed.
 
 operator bool () const
 Returns false if stream reading is failed.
 
Standard_Real ReadReal ()
 Reads real value from the stream.
 
BinTools_IStreamoperator>> (Standard_Real &theValue)
 
Standard_Integer ReadInteger ()
 Reads integer value from the stream.
 
BinTools_IStreamoperator>> (Standard_Integer &theValue)
 
gp_Pnt ReadPnt ()
 Reads point coordinates value from the stream.
 
BinTools_IStreamoperator>> (gp_Pnt &theValue)
 
Standard_Byte ReadByte ()
 Reads byte value from the stream.
 
BinTools_IStreamoperator>> (Standard_Byte &theValue)
 
Standard_Boolean ReadBool ()
 Reads boolean value from the stream (stored as one byte).
 
BinTools_IStreamoperator>> (Standard_Boolean &theValue)
 
Standard_ShortReal ReadShortReal ()
 Reads short real value from the stream.
 
BinTools_IStreamoperator>> (Standard_ShortReal &theValue)
 
BinTools_IStreamoperator>> (gp_Trsf &theValue)
 Reads transformation value from the stream.
 
void ReadBools (Standard_Boolean &theBool1, Standard_Boolean &theBool2, Standard_Boolean &theBool3)
 Reads 3 boolean values from one byte.
 
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.
 

Detailed Description

Substitution of IStream for shape reader for fast management of position in the file (get and go) and operation on all reading types.

Constructor & Destructor Documentation

◆ BinTools_IStream()

BinTools_IStream::BinTools_IStream ( Standard_IStream theStream)

Creates IStream using the current stream IStream.

Member Function Documentation

◆ GoTo()

void BinTools_IStream::GoTo ( const uint64_t thePosition)

Moves the current stream position to the given one.

◆ IsReference()

Standard_Boolean BinTools_IStream::IsReference ( )

Returns true if the last restored type is one of a reference.

◆ LastType()

const BinTools_ObjectType & BinTools_IStream::LastType ( )
inline

Returns the last read type.

◆ operator bool()

BinTools_IStream::operator bool ( ) const

Returns false if stream reading is failed.

◆ operator>>() [1/7]

BinTools_IStream & BinTools_IStream::operator>> ( gp_Pnt theValue)

◆ operator>>() [2/7]

BinTools_IStream & BinTools_IStream::operator>> ( gp_Trsf theValue)

Reads transformation value from the stream.

◆ operator>>() [3/7]

BinTools_IStream & BinTools_IStream::operator>> ( Standard_Boolean theValue)
inline

◆ operator>>() [4/7]

BinTools_IStream & BinTools_IStream::operator>> ( Standard_Byte theValue)

◆ operator>>() [5/7]

BinTools_IStream & BinTools_IStream::operator>> ( Standard_Integer theValue)

◆ operator>>() [6/7]

BinTools_IStream & BinTools_IStream::operator>> ( Standard_Real theValue)

◆ operator>>() [7/7]

BinTools_IStream & BinTools_IStream::operator>> ( Standard_ShortReal theValue)

◆ Position()

uint64_t BinTools_IStream::Position ( )
inline

Returns the current position in the stream.

◆ ReadBool()

Standard_Boolean BinTools_IStream::ReadBool ( )
inline

Reads boolean value from the stream (stored as one byte).

◆ ReadBools() [1/2]

void BinTools_IStream::ReadBools ( Standard_Boolean theBool1,
Standard_Boolean theBool2,
Standard_Boolean theBool3 
)

Reads 3 boolean values from one byte.

◆ ReadBools() [2/2]

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.

◆ ReadByte()

Standard_Byte BinTools_IStream::ReadByte ( )
inline

Reads byte value from the stream.

◆ ReadInteger()

Standard_Integer BinTools_IStream::ReadInteger ( )
inline

Reads integer value from the stream.

◆ ReadPnt()

gp_Pnt BinTools_IStream::ReadPnt ( )
inline

Reads point coordinates value from the stream.

◆ ReadReal()

Standard_Real BinTools_IStream::ReadReal ( )
inline

Reads real value from the stream.

◆ ReadReference()

uint64_t BinTools_IStream::ReadReference ( )

Reads a reference IStream using the last restored type.

◆ ReadShortReal()

Standard_ShortReal BinTools_IStream::ReadShortReal ( )
inline

Reads short real value from the stream.

◆ ReadType()

BinTools_ObjectType BinTools_IStream::ReadType ( )

Reads and returns the type.

◆ ShapeOrientation()

TopAbs_Orientation BinTools_IStream::ShapeOrientation ( )

Returns the shape orientation by the last retrieved type.

◆ ShapeType()

TopAbs_ShapeEnum BinTools_IStream::ShapeType ( )

Returns the shape type by the last retrieved type.

◆ Stream()

Standard_IStream & BinTools_IStream::Stream ( )
inline

Returns the original IStream.

◆ UpdatePosition()

void BinTools_IStream::UpdatePosition ( )
inline

Makes up to date the myPosition because myStream was used outside and position is changed.


The documentation for this class was generated from the following file: