#include "SMDS_CellOfNodes.hxx"
-SMDS_CellOfNodes::SMDS_CellOfNodes( int id, int shapeID )
+SMDS_CellOfNodes::SMDS_CellOfNodes( smIdType id, smIdType shapeID )
: myID( id )
{
setShapeID( shapeID );
}
-void SMDS_CellOfNodes::setID(const int id)
+void SMDS_CellOfNodes::setID(const smIdType id)
{
myID = id;
}
-int SMDS_CellOfNodes::GetID() const
+smIdType SMDS_CellOfNodes::GetID() const
{
return myID;
}
-void SMDS_CellOfNodes::setShapeID( const int shapeID )
+void SMDS_CellOfNodes::setShapeID( const smIdType shapeID )
{
myShapeID = ( shapeID << BITS_SHIFT ) | ( myShapeID & BIT_IS_MARKED );
}
-int SMDS_CellOfNodes::GetShapeID() const
+smIdType SMDS_CellOfNodes::GetShapeID() const
{
return myShapeID >> BITS_SHIFT;
}
#include "SMDS_MeshElement.hxx"
+#include <smIdType.hxx>
+
// ============================================================
/*!
* \brief Base class for elements not contained in the mesh
{
public:
- virtual int GetID() const;
- virtual int GetShapeID() const;
+ virtual smIdType GetID() const;
+ virtual smIdType GetShapeID() const;
virtual void setIsMarked( bool is ) const;
virtual bool isMarked() const;
protected:
- SMDS_CellOfNodes( int id = -1, int shapeID = 0);
+ SMDS_CellOfNodes( smIdType id = -1, smIdType shapeID = 0);
- virtual void setID( const int id);
- virtual void setShapeID( const int shapeID );
+ virtual void setID( const smIdType id);
+ virtual void setShapeID( const smIdType shapeID );
- int myID;
- int myShapeID;
+ smIdType myID;
+ smIdType myShapeID;
enum Bits { // use the 1st right bit of myShapeId to set/unset a mark
BIT_IS_MARKED = 1,
//================================================================================
/*!
* \brief Return a number of elements in a chunk
- * \return smIdType - chunk size
+ * \return int - chunk size
*/
//================================================================================
-smIdType SMDS_ElementFactory::ChunkSize()
+int SMDS_ElementFactory::ChunkSize()
{
return theChunkSize;
}
}
else if ( newNbCells == maxCellID ) // no holes
{
- int newID, minLastID = std::min( myVtkIDs.size(), theVtkIDsNewToOld.size() );
+ smIdType newID, minLastID = std::min( myVtkIDs.size(), theVtkIDsNewToOld.size() );
for ( newID = 0; newID < minLastID; ++newID )
theVtkIDsNewToOld[ newID ] = myVtkIDs[ newID ];
for ( ; newID < newNbCells; ++newID )
*/
//================================================================================
-int SMDS_ElementChunk::GetUnusedID() const
+smIdType SMDS_ElementChunk::GetUnusedID() const
{
TUsedRangeSet::set_iterator r = myUsedRanges.mySet.begin();
for ( ; r != myUsedRanges.mySet.end(); ++r )
*/
//================================================================================
-int SMDS_ElementChunk::GetID( const SMDS_MeshElement* e ) const
+smIdType SMDS_ElementChunk::GetID( const SMDS_MeshElement* e ) const
{
return my1stID + Index( e );
}
virtual bool CompactChangePointers();
//! Return a number of elements in a chunk
- static smIdType ChunkSize();
+ static int ChunkSize();
};
//------------------------------------------------------------------------------------
const SMDS_MeshElement* Element(int index) const { return & myElements[index]; }
//! Return ID of the first non-used element
- int GetUnusedID() const;
+ smIdType GetUnusedID() const;
//! Mark an element as used
void UseElement( const int index );
// Methods called by SMDS_MeshElement
- int GetID( const SMDS_MeshElement* e ) const;
+ smIdType GetID( const SMDS_MeshElement* e ) const;
int GetVtkID( const SMDS_MeshElement* e ) const;
void SetVTKID( const SMDS_MeshElement* e, const vtkIdType id );