1 // Created on: 1991-12-13
2 // Created by: Christophe MARION
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Intrv_Intervals_HeaderFile
18 #define _Intrv_Intervals_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Intrv_SequenceOfInterval.hxx>
25 #include <Standard_Integer.hxx>
26 class Standard_OutOfRange;
30 //! The class Intervals is a sorted sequence of non
31 //! overlapping Real Intervals.
39 //! Creates a void sequence of intervals.
40 Standard_EXPORT Intrv_Intervals();
42 //! Creates a sequence of one interval.
43 Standard_EXPORT Intrv_Intervals(const Intrv_Interval& Int);
45 //! Creates by copying an existing sequence of
47 Standard_EXPORT Intrv_Intervals(const Intrv_Intervals& Int);
49 //! Intersects the intervals with the interval <Tool>.
50 Standard_EXPORT void Intersect (const Intrv_Interval& Tool);
52 //! Intersects the intervals with the intervals in the
54 Standard_EXPORT void Intersect (const Intrv_Intervals& Tool);
56 Standard_EXPORT void Subtract (const Intrv_Interval& Tool);
58 Standard_EXPORT void Subtract (const Intrv_Intervals& Tool);
60 Standard_EXPORT void Unite (const Intrv_Interval& Tool);
62 Standard_EXPORT void Unite (const Intrv_Intervals& Tool);
64 Standard_EXPORT void XUnite (const Intrv_Interval& Tool);
66 Standard_EXPORT void XUnite (const Intrv_Intervals& Tool);
68 Standard_Integer NbIntervals() const;
70 const Intrv_Interval& Value (const Standard_Integer Index) const;
85 Intrv_SequenceOfInterval myInter;
91 #include <Intrv_Intervals.lxx>
97 #endif // _Intrv_Intervals_HeaderFile