00024b8417f51fe0136f25c8bde77b1d8b917d85
[occt.git] / src / Geom2dInt / Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
1 // Created on: 1992-06-04
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
18 #define _Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TCollection_BaseSequence.hxx>
25 #include <Standard_Integer.hxx>
26 class Standard_NoSuchObject;
27 class Standard_OutOfRange;
28 class Extrema_POnCurv2d;
29 class Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter;
30
31
32
33 class Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter  : public TCollection_BaseSequence
34 {
35 public:
36
37   DEFINE_STANDARD_ALLOC
38
39   
40   //! Constructs an empty sequence.
41   //! Use:
42   //! -   the function Append or Prepend to add an item or
43   //! a collection of items at the end, or at the beginning of the sequence,
44   //! -   the function InsertAfter or InsertBefore to add an
45   //! item or a collection of items at any position in the sequence,
46   //! -   operator() or the function SetValue to assign a
47   //! new value to an item of the sequence,
48   //! -   operator() to read an item of the sequence,
49   //! -   the function Remove to remove an item at any
50   //! position in the sequence.
51   //! Warning
52   //! To copy a sequence, you must explicitly call the
53   //! assignment operator (operator=).
54     Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
55   
56   //! Creation by copy of existing Sequence.
57   Standard_EXPORT Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter(const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other);
58   
59   //! Removes all element(s) of the sequence <me>
60   //! Example:
61   //! before
62   //! me = (A B C)
63   //! after
64   //! me = ()
65   Standard_EXPORT void Clear();
66 ~Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter()
67 {
68   Clear();
69 }
70   
71   //! Copies the contents of the sequence Other into this sequence.
72   //! If this sequence is not empty, it is automatically cleared before the copy.
73   Standard_EXPORT const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Assign (const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other);
74 const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& operator = (const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other)
75 {
76   return Assign(Other);
77 }
78   
79   //! Appends <T> at the end of <me>.
80   //! Example:
81   //! before
82   //! me = (A B C)
83   //! after
84   //! me = (A B C T)
85   Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
86   
87   //! Concatenates <S> at the end of <me>.
88   //! <S> is cleared.
89   //! Example:
90   //! before
91   //! me = (A B C)
92   //! S  = (D E F)
93   //! after
94   //! me = (A B C D E F)
95   //! S  = ()
96     void Append (Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
97   
98   //! Add <T> at the beginning of <me>.
99   //! Example:
100   //! before
101   //! me = (A B C)
102   //! after
103   //! me = (T A B C )
104   Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
105   
106   //! Concatenates <S> at the beginning of <me>.
107   //! <S> is cleared.
108   //! Example:
109   //! before
110   //! me = (A B C) S =  (D E F)
111   //! after me = (D E F A B C)
112   //! S = ()
113     void Prepend (Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
114   
115   //! Inserts  <T> in  <me>  before the position <Index>.
116   //! Raises an exception if the index is out of bounds.
117   //! Example:
118   //! before
119   //! me = (A B D), Index = 3, T = C
120   //! after
121   //! me = (A B C D )
122     void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
123   
124   //! Inserts the  sequence <S>  in  <me> before
125   //! the position <Index>. <S> is cleared.
126   //! Raises an exception if the index is out of bounds
127   //! Example:
128   //! before
129   //! me = (A B F), Index = 3, S = (C D E)
130   //! after
131   //! me = (A B C D E F)
132   //! S  = ()
133     void InsertBefore (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
134   
135   //! Inserts  <T>  in  <me> after the  position <Index>.
136   //! Raises an exception if the index is out of bound
137   //! Example:
138   //! before
139   //! me = (A B C), Index = 3, T = D
140   //! after
141   //! me = (A B C D)
142   Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
143   
144   //! Inserts the sequence <S> in <me> after the
145   //! position <Index>. <S> is cleared.
146   //! Raises an exception if the index is out of bound.
147   //! Example:
148   //! before
149   //! me = (A B C), Index = 3, S = (D E F)
150   //! after
151   //! me = (A B C D E F)
152   //! S  = ()
153     void InsertAfter (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
154   
155   //! Returns the first element of the sequence <me>
156   //! Raises an exception if the sequence is empty.
157   //! Example:
158   //! before
159   //! me = (A B C)
160   //! after
161   //! me = (A B C)
162   //! returns A
163   Standard_EXPORT const Extrema_POnCurv2d& First() const;
164   
165   //! Returns the last element of the sequence <me>
166   //! Raises an exception if the sequence is empty.
167   //! Example:
168   //! before
169   //! me = (A B C)
170   //! after
171   //! me = (A B C)
172   //! returns C
173   Standard_EXPORT const Extrema_POnCurv2d& Last() const;
174   
175   //! Keeps in <me> the items 1 to <Index>-1 and
176   //! puts  in  <Sub> the  items <Index>  to the end.
177   //! Example:
178   //! before
179   //! me = (A B C D) ,Index = 3
180   //! after
181   //! me  = (A B)
182   //! Sub = (C D)
183     void Split (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Sub);
184   
185   //! Returns  the Item  at position <Index>  in <me>.
186   //! Raises an exception if the index is out of bound
187   //! Example:
188   //! before
189   //! me = (A B C), Index = 1
190   //! after
191   //! me = (A B C)
192   //! returns
193   //! A
194   Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
195 const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
196 {
197   return Value(Index);
198 }
199   
200   //! Changes the item at position <Index>
201   //! Raises an exception if the index is out of bound
202   //! Example:
203   //! before
204   //! me = (A B C), Index = 1, Item = D
205   //! after
206   //! me = (D B C)
207   Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
208   
209   //! Returns  the Item  at position <Index>  in
210   //! <me>. This method  may  be  used to modify
211   //! <me> : S.Value(Index) = Item.
212   //! Raises an exception if the index is out of bound
213   //! Example:
214   //! before
215   //! me = (A B C), Index = 1
216   //! after
217   //! me = (A B C)
218   //! returns
219   //! A
220   Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
221 Extrema_POnCurv2d& operator() (const Standard_Integer Index)
222 {
223   return ChangeValue(Index);
224 }
225   
226   //! Removes  from  <me> the  item at  position <Index>.
227   //! Raises an exception if the index is out of bounds
228   //! Example:
229   //! before
230   //! me = (A B C), Index = 3
231   //! after
232   //! me = (A B)
233   Standard_EXPORT void Remove (const Standard_Integer Index);
234   
235   //! Removes  from  <me>    all  the  items  of
236   //! positions between <FromIndex> and <ToIndex>.
237   //! Raises an exception if the indices are out of bounds.
238   //! Example:
239   //! before
240   //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
241   //! after
242   //! me = (D E F)
243   Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
244
245
246
247
248 protected:
249
250
251
252
253
254 private:
255
256
257
258
259
260 };
261
262 #define SeqItem Extrema_POnCurv2d
263 #define SeqItem_hxx <Extrema_POnCurv2d.hxx>
264 #define TCollection_SequenceNode Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
265 #define TCollection_SequenceNode_hxx <Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
266 #define Handle_TCollection_SequenceNode Handle(Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter)
267 #define TCollection_Sequence Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
268 #define TCollection_Sequence_hxx <Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
269
270 #include <TCollection_Sequence.lxx>
271
272 #undef SeqItem
273 #undef SeqItem_hxx
274 #undef TCollection_SequenceNode
275 #undef TCollection_SequenceNode_hxx
276 #undef Handle_TCollection_SequenceNode
277 #undef TCollection_Sequence
278 #undef TCollection_Sequence_hxx
279
280
281
282
283 #endif // _Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile