OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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.
    const uint64_t & Position ()
     Returns the current position of the stream.
    void WriteReference (const uint64_t &thePosition)
     Writes the reference to the given position (an offset between the current and the given one).
    void WriteShape (const TopAbs_ShapeEnum &theType, const TopAbs_Orientation &theOrientation)
     Writes an identifier of shape type and orientation into the stream.
    BinTools_OStream & operator<< (const BinTools_ObjectType &theType)
     Writes an object type to the stream.
    BinTools_OStream & operator<< (const uint8_t &theValue)
     Writes a byte to the stream.
    BinTools_OStream & operator<< (const double &theValue)
     Writes a real to the stream.
    BinTools_OStream & operator<< (const bool &theValue)
     Writes a boolean to the stream.
    BinTools_OStream & operator<< (const int &theValue)
     Writes a integer to the stream.
    BinTools_OStream & operator<< (const char16_t &theValue)
     Writes a extended character to the stream.
    BinTools_OStream & operator<< (const gp_Pnt &theValue)
     Writes a 3D point to the stream.
    BinTools_OStream & operator<< (const gp_Dir &theValue)
     Writes a 3D direction to the stream.
    BinTools_OStream & operator<< (const gp_Pnt2d &theValue)
     Writes a 2D point to the stream.
    BinTools_OStream & operator<< (const gp_Dir2d &theValue)
     Writes a 2D direction to the stream.
    BinTools_OStream & operator<< (const gp_Trsf &theValue)
     Writes a transformation matrix to the stream.
    BinTools_OStream & operator<< (const Poly_Triangle &theValue)
     Writes triangle nodes indices to the stream.
    BinTools_OStream & operator<< (const NCollection_Vec3< float > &theValue)
     Writes a vector to the stream.
    void PutBools (const bool theValue1, const bool theValue2, const bool theValue3)
     Writes 3 booleans as one byte to the stream.
    void PutBools (const bool theValue1, const bool theValue2, const bool theValue3, const bool theValue4, const bool theValue5, const bool theValue6, const bool theValue7)
     Writes 7 booleans as one byte to the stream.

    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 bool & theValue)

    Writes a boolean to the stream.

    ◆ operator<<() [3/13]

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

    Writes a extended character to the stream.

    ◆ operator<<() [4/13]

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

    Writes a real to the stream.

    ◆ operator<<() [5/13]

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

    Writes a 3D direction to the stream.

    ◆ operator<<() [6/13]

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

    Writes a 2D direction 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_Pnt2d & theValue)

    Writes a 2D point to the stream.

    ◆ operator<<() [9/13]

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

    Writes a transformation matrix to the stream.

    ◆ operator<<() [10/13]

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

    Writes a integer to the stream.

    ◆ operator<<() [11/13]

    BinTools_OStream & BinTools_OStream::operator<< ( const NCollection_Vec3< float > & theValue)

    Writes a vector 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 uint8_t & theValue)

    Writes a byte 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 bool theValue1,
    const bool theValue2,
    const bool theValue3 )

    Writes 3 booleans as one byte to the stream.

    ◆ PutBools() [2/2]

    void BinTools_OStream::PutBools ( const bool theValue1,
    const bool theValue2,
    const bool theValue3,
    const bool theValue4,
    const bool theValue5,
    const bool theValue6,
    const bool 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: