Open CASCADE Technology  7.6.0
Public Member Functions | Static Public Attributes

BinTools_ShapeSetBase Class Reference

A base class for all readers/writers of TopoDS_Shape into/from stream. More...

#include <BinTools_ShapeSetBase.hxx>

Inheritance diagram for BinTools_ShapeSetBase:
Inheritance graph
[legend]

Public Member Functions

 BinTools_ShapeSetBase ()
 A default constructor. More...
 
virtual ~BinTools_ShapeSetBase ()
 
Standard_Boolean IsWithTriangles () const
 Return true if shape should be stored with triangles. More...
 
Standard_Boolean IsWithNormals () const
 Return true if shape should be stored triangulation with normals. More...
 
void SetWithTriangles (const Standard_Boolean theWithTriangles)
 Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface). More...
 
void SetWithNormals (const Standard_Boolean theWithNormals)
 Define if shape will be stored triangulation with normals. Ignored (always written) if face defines only triangulation (no surface). More...
 
void SetFormatNb (const Standard_Integer theFormatNb)
 Sets the BinTools_FormatVersion. More...
 
Standard_Integer FormatNb () const
 Returns the BinTools_FormatVersion. More...
 
virtual void Clear ()
 Clears the content of the set. More...
 
virtual void Write (Standard_OStream &, const Message_ProgressRange &=Message_ProgressRange())
 Writes the content of me on the stream <OS> in binary format that can be read back by Read. More...
 
virtual void Read (Standard_IStream &, const Message_ProgressRange &=Message_ProgressRange())
 Reads the content of me from the binary stream <IS>. me is first cleared. More...
 
virtual void Write (const TopoDS_Shape &, Standard_OStream &)
 Writes on <OS> the shape . Writes the orientation, the index of the TShape and the index of the Location. More...
 
virtual void Read (Standard_IStream &, TopoDS_Shape &)
 An empty virtual method for redefinition in shape-reader. More...
 

Static Public Attributes

static const Standard_CString THE_ASCII_VERSIONS [BinTools_FormatVersion_UPPER+1]
 

Detailed Description

A base class for all readers/writers of TopoDS_Shape into/from stream.

Constructor & Destructor Documentation

◆ BinTools_ShapeSetBase()

BinTools_ShapeSetBase::BinTools_ShapeSetBase ( )

A default constructor.

◆ ~BinTools_ShapeSetBase()

virtual BinTools_ShapeSetBase::~BinTools_ShapeSetBase ( )
virtual

Member Function Documentation

◆ Clear()

virtual void BinTools_ShapeSetBase::Clear ( )
inlinevirtual

Clears the content of the set.

Reimplemented in BinTools_ShapeWriter, BinTools_ShapeReader, and BinTools_ShapeSet.

◆ FormatNb()

Standard_Integer BinTools_ShapeSetBase::FormatNb ( ) const
inline

Returns the BinTools_FormatVersion.

◆ IsWithNormals()

Standard_Boolean BinTools_ShapeSetBase::IsWithNormals ( ) const
inline

Return true if shape should be stored triangulation with normals.

◆ IsWithTriangles()

Standard_Boolean BinTools_ShapeSetBase::IsWithTriangles ( ) const
inline

Return true if shape should be stored with triangles.

◆ Read() [1/2]

virtual void BinTools_ShapeSetBase::Read ( Standard_IStream ,
const Message_ProgressRange = Message_ProgressRange() 
)
inlinevirtual

Reads the content of me from the binary stream <IS>. me is first cleared.

Reads the locations.

Reads the geometry calling ReadGeometry.

Reads the shapes. For each shape Reads the type. calls ReadGeometry(T,S). Reads the flag, the subshapes.

Reimplemented in BinTools_ShapeSet.

◆ Read() [2/2]

virtual void BinTools_ShapeSetBase::Read ( Standard_IStream ,
TopoDS_Shape  
)
inlinevirtual

An empty virtual method for redefinition in shape-reader.

Reimplemented in BinTools_ShapeReader, and BinTools_ShapeSet.

◆ SetFormatNb()

void BinTools_ShapeSetBase::SetFormatNb ( const Standard_Integer  theFormatNb)

Sets the BinTools_FormatVersion.

◆ SetWithNormals()

void BinTools_ShapeSetBase::SetWithNormals ( const Standard_Boolean  theWithNormals)
inline

Define if shape will be stored triangulation with normals. Ignored (always written) if face defines only triangulation (no surface).

◆ SetWithTriangles()

void BinTools_ShapeSetBase::SetWithTriangles ( const Standard_Boolean  theWithTriangles)
inline

Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface).

◆ Write() [1/2]

virtual void BinTools_ShapeSetBase::Write ( const TopoDS_Shape ,
Standard_OStream  
)
inlinevirtual

Writes on <OS> the shape . Writes the orientation, the index of the TShape and the index of the Location.

Reimplemented in BinTools_ShapeWriter, and BinTools_ShapeSet.

◆ Write() [2/2]

virtual void BinTools_ShapeSetBase::Write ( Standard_OStream ,
const Message_ProgressRange = Message_ProgressRange() 
)
inlinevirtual

Writes the content of me on the stream <OS> in binary format that can be read back by Read.

Writes the locations.

Writes the geometry calling WriteGeometry.

Dumps the shapes from last to first. For each shape : Write the type. calls WriteGeometry(S). Write the flags, the subshapes.

Reimplemented in BinTools_ShapeSet.

Field Documentation

◆ THE_ASCII_VERSIONS

const Standard_CString BinTools_ShapeSetBase::THE_ASCII_VERSIONS[BinTools_FormatVersion_UPPER+1]
static

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