Version: 9.16.0
_RangeSet< RANGE > Struct Template Reference

Sorted set of ranges. More...

#include <SMDS_ElementFactory.hxx>

Inheritance diagram for _RangeSet< RANGE >:

Public Types

typedef RANGE::attr_t attr_t
 
typedef boost::container::flat_set< RANGE > set_t
 
typedef set_t::const_iterator set_iterator
 

Public Member Functions

 _RangeSet ()
 
size_t Size () const
 Return a number of ranges. More...
 
int & First (set_iterator rangePtr)
 Return a mutable _Range::my1st of a range pointed by an iterator. More...
 
size_t Size (set_iterator rangePtr) const
 Return a number of elements in a range pointed by an iterator. More...
 
bool GetIndices (const attr_t theValue, TIndexRanges &theIndices, const attr_t *=0, const attr_t *=0) const
 Return ranges of indices (from,to) of elements having a given value. More...
 
attr_t GetValue (int theIndex) const
 Return value of an element attribute. More...
 
attr_t SetValue (int theIndex, attr_t theValue)
 Change value of an element attribute. More...
 

Data Fields

set_t mySet
 

Detailed Description

template<class RANGE>
struct _RangeSet< RANGE >

Sorted set of ranges.

Member Typedef Documentation

◆ attr_t

template<class RANGE >
typedef RANGE::attr_t _RangeSet< RANGE >::attr_t

◆ set_iterator

template<class RANGE >
typedef set_t::const_iterator _RangeSet< RANGE >::set_iterator

◆ set_t

template<class RANGE >
typedef boost::container::flat_set< RANGE > _RangeSet< RANGE >::set_t

Constructor & Destructor Documentation

◆ _RangeSet()

template<class RANGE >
_RangeSet< RANGE >::_RangeSet ( )

Member Function Documentation

◆ First()

template<class RANGE >
int & _RangeSet< RANGE >::First ( set_iterator  rangePtr)

Return a mutable _Range::my1st of a range pointed by an iterator.

Referenced by _RangeSet< RANGE >::SetValue().

◆ GetIndices()

template<class RANGE >
bool _RangeSet< RANGE >::GetIndices ( const attr_t  theValue,
TIndexRanges theIndices,
const attr_t = 0,
const attr_t = 0 
) const

Return ranges of indices (from,to) of elements having a given value.

References _RangeSet< RANGE >::mySet, and _RangeSet< RANGE >::Size().

◆ GetValue()

template<class RANGE >
attr_t _RangeSet< RANGE >::GetValue ( int  theIndex) const

Return value of an element attribute.

Parameters
[in]theIndex- element index
Returns
attr_t - attribute value

References _RangeSet< RANGE >::mySet.

Referenced by SMDS_ElementChunk::GetShapeID().

◆ SetValue()

template<class RANGE >
attr_t _RangeSet< RANGE >::SetValue ( int  theIndex,
attr_t  theValue 
)

Change value of an element attribute.

Parameters
[in]theIndex- element index
[in]theValue- attribute value
Returns
attr_t - previous value

References _RangeSet< RANGE >::First(), _RangeSet< RANGE >::mySet, and _RangeSet< RANGE >::Size().

Referenced by SMDS_ElementChunk::Free(), SMDS_ElementChunk::SetShapeID(), and SMDS_ElementChunk::UseElement().

◆ Size() [1/2]

◆ Size() [2/2]

template<class RANGE >
size_t _RangeSet< RANGE >::Size ( set_iterator  rangePtr) const

Return a number of elements in a range pointed by an iterator.

References SMDS_ElementFactory::ChunkSize(), and _RangeSet< RANGE >::mySet.

Field Documentation

◆ mySet