Open CASCADE Technology  7.7.0
Public Member Functions
BinTools_OStream Class Reference

Substitution of OStream for shape writer for fast management of position in the file and operation on all writing types. More...

#include <BinTools_OStream.hxx>

Public Member Functions

 BinTools_OStream (Standard_OStream &theStream)
 Creates OStream using the current stream OStream. More...
 
const uint64_t & Position ()
 Returns the current position of the stream. More...
 
void WriteReference (const uint64_t &thePosition)
 Writes the reference to the given position (an offset between the current and the given one). More...
 
void WriteShape (const TopAbs_ShapeEnum &theType, const TopAbs_Orientation &theOrientation)
 Writes an identifier of shape type and orientation into the stream. More...
 
BinTools_OStreamoperator<< (const BinTools_ObjectType &theType)
 Writes an object type to the stream. More...
 
BinTools_OStreamoperator<< (const Standard_Byte &theValue)
 Writes a byte to the stream. More...
 
BinTools_OStreamoperator<< (const Standard_Real &theValue)
 Writes a real to the stream. More...
 
BinTools_OStreamoperator<< (const Standard_Boolean &theValue)
 Writes a boolean to the stream. More...
 
BinTools_OStreamoperator<< (const Standard_Integer &theValue)
 Writes a integer to the stream. More...
 
BinTools_OStreamoperator<< (const Standard_ExtCharacter &theValue)
 Writes a extended character to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Pnt &theValue)
 Writes a 3D point to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Dir &theValue)
 Writes a 3D direction to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Pnt2d &theValue)
 Writes a 2D point to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Dir2d &theValue)
 Writes a 2D direction to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Trsf &theValue)
 Writes a transformation matrix to the stream. More...
 
BinTools_OStreamoperator<< (const Poly_Triangle &theValue)
 Writes triangle nodes indices to the stream. More...
 
BinTools_OStreamoperator<< (const gp_Vec3f &theValue)
 Writes a vector to the stream. More...
 
void PutBools (const Standard_Boolean theValue1, const Standard_Boolean theValue2, const Standard_Boolean theValue3)
 Writes 3 booleans as one byte to the stream. More...
 
void PutBools (const Standard_Boolean theValue1, const Standard_Boolean theValue2, const Standard_Boolean theValue3, const Standard_Boolean theValue4, const Standard_Boolean theValue5, const Standard_Boolean theValue6, const Standard_Boolean theValue7)
 Writes 7 booleans as one byte to the stream. More...
 

Detailed Description

Substitution of OStream for shape writer for fast management of position in the file and operation on all writing types.

Constructor & Destructor Documentation

◆ BinTools_OStream()

BinTools_OStream::BinTools_OStream ( Standard_OStream theStream)

Creates OStream using the current stream OStream.

Member Function Documentation

◆ operator<<() [1/13]

BinTools_OStream& BinTools_OStream::operator<< ( const BinTools_ObjectType theType)

Writes an object type to the stream.

◆ operator<<() [2/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Standard_Byte theValue)

Writes a byte to the stream.

◆ operator<<() [3/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Standard_Real theValue)

Writes a real to the stream.

◆ operator<<() [4/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Standard_Boolean theValue)

Writes a boolean to the stream.

◆ operator<<() [5/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Standard_Integer theValue)

Writes a integer to the stream.

◆ operator<<() [6/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Standard_ExtCharacter theValue)

Writes a extended character to the stream.

◆ operator<<() [7/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Pnt theValue)

Writes a 3D point to the stream.

◆ operator<<() [8/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Dir theValue)

Writes a 3D direction to the stream.

◆ operator<<() [9/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Pnt2d theValue)

Writes a 2D point to the stream.

◆ operator<<() [10/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Dir2d theValue)

Writes a 2D direction to the stream.

◆ operator<<() [11/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Trsf theValue)

Writes a transformation matrix to the stream.

◆ operator<<() [12/13]

BinTools_OStream& BinTools_OStream::operator<< ( const Poly_Triangle theValue)

Writes triangle nodes indices to the stream.

◆ operator<<() [13/13]

BinTools_OStream& BinTools_OStream::operator<< ( const gp_Vec3f theValue)

Writes a vector to the stream.

◆ Position()

const uint64_t& BinTools_OStream::Position ( )
inline

Returns the current position of the stream.

◆ PutBools() [1/2]

void BinTools_OStream::PutBools ( const Standard_Boolean  theValue1,
const Standard_Boolean  theValue2,
const Standard_Boolean  theValue3 
)

Writes 3 booleans as one byte to the stream.

◆ PutBools() [2/2]

void BinTools_OStream::PutBools ( const Standard_Boolean  theValue1,
const Standard_Boolean  theValue2,
const Standard_Boolean  theValue3,
const Standard_Boolean  theValue4,
const Standard_Boolean  theValue5,
const Standard_Boolean  theValue6,
const Standard_Boolean  theValue7 
)

Writes 7 booleans as one byte to the stream.

◆ WriteReference()

void BinTools_OStream::WriteReference ( const uint64_t &  thePosition)

Writes the reference to the given position (an offset between the current and the given one).

◆ WriteShape()

void BinTools_OStream::WriteShape ( const TopAbs_ShapeEnum theType,
const TopAbs_Orientation theOrientation 
)

Writes an identifier of shape type and orientation into the stream.


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