0029642: Foundation Classes - deprecate TCollection classes except strings
[occt.git] / src / TCollection / TCollection_Sequence.lxx
1 // Created on: 1992-12-22
2 // Created by: Remi LEQUETTE
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 //=======================================================================
18 //function : Empty constructor
19 //purpose  : 
20 //=======================================================================
21
22 inline TCollection_Sequence::TCollection_Sequence()
23 {
24 }
25
26 //=======================================================================
27 //function : Copy constructor
28 //purpose  : 
29 //=======================================================================
30
31 inline TCollection_Sequence::TCollection_Sequence(const TCollection_Sequence& theOther)
32 {
33   Assign(theOther);
34 }
35
36 //=======================================================================
37 //function : Append 
38 //purpose  : Appends a Sequence to myself
39 //=======================================================================
40 inline void  TCollection_Sequence::Append (TCollection_Sequence& S)
41 {
42   if (FirstItem == S.FirstItem) Assign(S);
43   PAppend (S);
44 }
45
46 //=======================================================================
47 //function : Prepend 
48 //purpose  : Prepends a Sequence to myself
49 //=======================================================================
50 inline void TCollection_Sequence::Prepend (TCollection_Sequence& S)
51 {
52   if (FirstItem == S.FirstItem) Assign(S);
53   PPrepend (S);
54 }
55 //=======================================================================
56 //function : InsertBefore
57 //purpose  : Inserts an item before an index
58 //=======================================================================
59 inline void TCollection_Sequence::InsertBefore (const Standard_Integer Index,
60                                                 const SeqItem& I)
61 {
62   InsertAfter(Index-1,I);
63 }
64
65 //=======================================================================
66 //function : InsertBefore
67 //purpose  : Inserts a Sequence before an index
68 //=======================================================================
69 inline void TCollection_Sequence::InsertBefore (const Standard_Integer Index,
70                                                  TCollection_Sequence& S)
71 {
72   InsertAfter(Index-1,S);
73 }
74
75 //=======================================================================
76 //function : InsertAfter
77 //purpose  : Inserts a Sequence after an index
78 //=======================================================================
79 inline void TCollection_Sequence::InsertAfter (const Standard_Integer Index,
80                                                TCollection_Sequence& S)
81 {
82   PInsertAfter(Index,S);
83 }
84
85 //=======================================================================
86 //function : Split
87 //purpose  : Cuts a Sequence into two
88 //=======================================================================
89 inline void TCollection_Sequence::Split (const Standard_Integer Index,
90                                           TCollection_Sequence& S)
91 {
92   S.Clear();
93   PSplit(Index,S);
94 }
95
96
97
98
99
100
101