7fd59977 |
1 | // File: NCollection_DefineHArray2.hxx |
2 | // Created: Mon Apr 29 11:36:31 2002 |
3 | // Author: Alexander KARTOMIN (akm) |
4 | // <a-kartomin@opencascade.com> |
5 | // Automatically created from NCollection_HArray2.hxx by GAWK |
6 | // Copyright: Open Cascade 2002 |
7 | |
8 | #ifndef NCollection_DefineHArray2_HeaderFile |
9 | #define NCollection_DefineHArray2_HeaderFile |
10 | |
11 | #include <Standard_DefineHandle.hxx> |
12 | #include <NCollection_DefineArray2.hxx> |
13 | #include <MMgt_TShared.hxx> |
14 | |
15 | // Declaration of Array2 class managed by Handle |
16 | |
17 | #define DEFINE_HARRAY2(HClassName, _Array2Type_) \ |
18 | \ |
19 | class HClassName : public _Array2Type_, \ |
20 | public MMgt_TShared { \ |
21 | public: \ |
22 | inline HClassName (const Standard_Integer theRowLower, \ |
23 | const Standard_Integer theRowUpper, \ |
24 | const Standard_Integer theColLower, \ |
25 | const Standard_Integer theColUpper);\ |
26 | inline HClassName (const _Array2Type_&); \ |
27 | inline const _Array2Type_& Array2 () const; \ |
28 | inline _Array2Type_& ChangeArray2(); \ |
29 | DEFINE_STANDARD_RTTI (HClassName) \ |
30 | }; \ |
31 | \ |
32 | DEFINE_STANDARD_HANDLE (HClassName, MMgt_TShared) \ |
33 | \ |
34 | inline HClassName::HClassName (const Standard_Integer theRowLow, \ |
35 | const Standard_Integer theRowUpp, \ |
36 | const Standard_Integer theColLow, \ |
37 | const Standard_Integer theColUpp) : \ |
38 | _Array2Type_ (theRowLow, theRowUpp, theColLow, theColUpp), \ |
39 | MMgt_TShared() {} \ |
40 | \ |
41 | inline HClassName::HClassName (const _Array2Type_& theOther) : \ |
42 | _Array2Type_(theOther), \ |
43 | MMgt_TShared() {} \ |
44 | \ |
45 | inline const _Array2Type_& HClassName::Array2 () const \ |
46 | { return * (const _Array2Type_ *) this; } \ |
47 | \ |
48 | inline _Array2Type_& HClassName::ChangeArray2 () \ |
49 | { return * (_Array2Type_ *) this; } \ |
50 | |
51 | #define IMPLEMENT_HARRAY2(HClassName) \ |
52 | IMPLEMENT_STANDARD_HANDLE (HClassName, MMgt_TShared) \ |
53 | IMPLEMENT_STANDARD_RTTIEXT (HClassName, MMgt_TShared) |
54 | |
55 | #endif |