0026586: Eliminate compile warnings obtained by building occt with vc14: declaration...
[occt.git] / src / IntTools / IntTools_CArray1OfReal.hxx
1 // Created on: 2000-05-18
2 // Created by: Peter KURNEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _IntTools_CArray1OfReal_HeaderFile
17 #define _IntTools_CArray1OfReal_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
22
23 #include <Standard_Address.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_Real.hxx>
27 class Standard_ConstructionError;
28 class Standard_OutOfRange;
29 class Standard_OutOfMemory;
30
31
32
33 class IntTools_CArray1OfReal 
34 {
35 public:
36
37   DEFINE_STANDARD_ALLOC
38
39   
40   Standard_EXPORT IntTools_CArray1OfReal(const Standard_Integer Length = 0);
41   
42   Standard_EXPORT IntTools_CArray1OfReal(const Standard_Real& Item, const Standard_Integer Length);
43   
44   Standard_EXPORT void Init (const Standard_Real& V);
45   
46   Standard_EXPORT void Resize (const Standard_Integer theNewLength);
47   
48   Standard_EXPORT void Destroy();
49 ~IntTools_CArray1OfReal()
50 {
51   Destroy();
52 }
53   
54     Standard_Integer Length() const;
55   
56   Standard_EXPORT void Append (const Standard_Real& Value);
57   
58   Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Real& Value);
59   
60   Standard_EXPORT const Standard_Real& Value (const Standard_Integer Index) const;
61 const Standard_Real& operator () (const Standard_Integer Index) const
62 {
63   return Value(Index);
64 }
65   
66   Standard_EXPORT Standard_Real& ChangeValue (const Standard_Integer Index);
67 Standard_Real& operator () (const Standard_Integer Index)
68 {
69   return ChangeValue(Index);
70 }
71   
72   Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfReal& Other) const;
73 Standard_Boolean operator == (const IntTools_CArray1OfReal& Other) const
74 {
75   return IsEqual(Other);
76 }
77
78
79
80
81 protected:
82
83
84
85
86
87 private:
88
89   
90   Standard_EXPORT IntTools_CArray1OfReal(const IntTools_CArray1OfReal& AnArray);
91
92
93   Standard_Address myStart;
94   Standard_Integer myLength;
95   Standard_Boolean myIsAllocated;
96
97
98 };
99
100 #define Array1Item Standard_Real
101 #define Array1Item_hxx <Standard_Real.hxx>
102 #define IntTools_CArray1 IntTools_CArray1OfReal
103 #define IntTools_CArray1_hxx <IntTools_CArray1OfReal.hxx>
104
105 #include <IntTools_CArray1.lxx>
106
107 #undef Array1Item
108 #undef Array1Item_hxx
109 #undef IntTools_CArray1
110 #undef IntTools_CArray1_hxx
111
112
113
114
115 #endif // _IntTools_CArray1OfReal_HeaderFile