Open CASCADE Technology  7.3.0
Public Member Functions
IntTools_MarkedRangeSet Class Reference

class MarkedRangeSet provides continuous set of ranges marked with flags More...

#include <IntTools_MarkedRangeSet.hxx>

Public Member Functions

 IntTools_MarkedRangeSet ()
 Empty constructor. More...
 
 IntTools_MarkedRangeSet (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theInitFlag)
 build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary More...
 
 IntTools_MarkedRangeSet (const IntTools_CArray1OfReal &theSortedArray, const Standard_Integer theInitFlag)
 Build set of ranges based on the array of progressive sorted values. More...
 
void SetBoundaries (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theInitFlag)
 build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary More...
 
void SetRanges (const IntTools_CArray1OfReal &theSortedArray, const Standard_Integer theInitFlag)
 Build set of ranges based on the array of progressive sorted values. More...
 
Standard_Boolean InsertRange (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theFlag)
 Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False. More...
 
Standard_Boolean InsertRange (const IntTools_Range &theRange, const Standard_Integer theFlag)
 Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False. More...
 
Standard_Boolean InsertRange (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theFlag, const Standard_Integer theIndex)
 Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False. More...
 
Standard_Boolean InsertRange (const IntTools_Range &theRange, const Standard_Integer theFlag, const Standard_Integer theIndex)
 Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False. More...
 
void SetFlag (const Standard_Integer theIndex, const Standard_Integer theFlag)
 Set flag theFlag for range with index theIndex. More...
 
Standard_Integer Flag (const Standard_Integer theIndex) const
 Returns flag of the range with index theIndex. More...
 
Standard_Integer GetIndex (const Standard_Real theValue) const
 Returns index of range which contains theValue. If theValue do not belong any range returns 0. More...
 
const TColStd_SequenceOfIntegerGetIndices (const Standard_Real theValue)
 
Standard_Integer GetIndex (const Standard_Real theValue, const Standard_Boolean UseLower) const
 Returns index of range which contains theValue If theValue do not belong any range returns 0. If UseLower is Standard_True then lower boundary of the range can be equal to theValue, otherwise upper boundary of the range can be equal to theValue. More...
 
Standard_Integer Length () const
 Returns number of ranges. More...
 
IntTools_Range Range (const Standard_Integer theIndex) const
 Returns the range with index theIndex. the Index can be from 1 to Length() More...
 

Detailed Description

class MarkedRangeSet provides continuous set of ranges marked with flags

Constructor & Destructor Documentation

◆ IntTools_MarkedRangeSet() [1/3]

IntTools_MarkedRangeSet::IntTools_MarkedRangeSet ( )

Empty constructor.

◆ IntTools_MarkedRangeSet() [2/3]

IntTools_MarkedRangeSet::IntTools_MarkedRangeSet ( const Standard_Real  theFirstBoundary,
const Standard_Real  theLastBoundary,
const Standard_Integer  theInitFlag 
)

build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary

◆ IntTools_MarkedRangeSet() [3/3]

IntTools_MarkedRangeSet::IntTools_MarkedRangeSet ( const IntTools_CArray1OfReal theSortedArray,
const Standard_Integer  theInitFlag 
)

Build set of ranges based on the array of progressive sorted values.

Warning: The constructor do not check if the values of array are not sorted It should be checked before function invocation

Member Function Documentation

◆ Flag()

Standard_Integer IntTools_MarkedRangeSet::Flag ( const Standard_Integer  theIndex) const

Returns flag of the range with index theIndex.

◆ GetIndex() [1/2]

Standard_Integer IntTools_MarkedRangeSet::GetIndex ( const Standard_Real  theValue) const

Returns index of range which contains theValue. If theValue do not belong any range returns 0.

◆ GetIndex() [2/2]

Standard_Integer IntTools_MarkedRangeSet::GetIndex ( const Standard_Real  theValue,
const Standard_Boolean  UseLower 
) const

Returns index of range which contains theValue If theValue do not belong any range returns 0. If UseLower is Standard_True then lower boundary of the range can be equal to theValue, otherwise upper boundary of the range can be equal to theValue.

◆ GetIndices()

const TColStd_SequenceOfInteger& IntTools_MarkedRangeSet::GetIndices ( const Standard_Real  theValue)

◆ InsertRange() [1/4]

Standard_Boolean IntTools_MarkedRangeSet::InsertRange ( const Standard_Real  theFirstBoundary,
const Standard_Real  theLastBoundary,
const Standard_Integer  theFlag 
)

Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.

◆ InsertRange() [2/4]

Standard_Boolean IntTools_MarkedRangeSet::InsertRange ( const IntTools_Range theRange,
const Standard_Integer  theFlag 
)

Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.

◆ InsertRange() [3/4]

Standard_Boolean IntTools_MarkedRangeSet::InsertRange ( const Standard_Real  theFirstBoundary,
const Standard_Real  theLastBoundary,
const Standard_Integer  theFlag,
const Standard_Integer  theIndex 
)

Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.

◆ InsertRange() [4/4]

Standard_Boolean IntTools_MarkedRangeSet::InsertRange ( const IntTools_Range theRange,
const Standard_Integer  theFlag,
const Standard_Integer  theIndex 
)

Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.

◆ Length()

Standard_Integer IntTools_MarkedRangeSet::Length ( ) const

Returns number of ranges.

◆ Range()

IntTools_Range IntTools_MarkedRangeSet::Range ( const Standard_Integer  theIndex) const

Returns the range with index theIndex. the Index can be from 1 to Length()

◆ SetBoundaries()

void IntTools_MarkedRangeSet::SetBoundaries ( const Standard_Real  theFirstBoundary,
const Standard_Real  theLastBoundary,
const Standard_Integer  theInitFlag 
)

build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary

◆ SetFlag()

void IntTools_MarkedRangeSet::SetFlag ( const Standard_Integer  theIndex,
const Standard_Integer  theFlag 
)

Set flag theFlag for range with index theIndex.

◆ SetRanges()

void IntTools_MarkedRangeSet::SetRanges ( const IntTools_CArray1OfReal theSortedArray,
const Standard_Integer  theInitFlag 
)

Build set of ranges based on the array of progressive sorted values.

Warning: The function do not check if the values of array are not sorted It should be checked before function invocation


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