1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef ADC_DISPLAY_HTML_PROTAREA_HXX 25 #define ADC_DISPLAY_HTML_PROTAREA_HXX 26 27 // USED SERVICES 28 #include <ary/cpp/c_types4cpp.hxx> 29 30 namespace csi 31 { 32 namespace html 33 { 34 class Table; 35 } 36 } 37 38 39 40 41 class ProtectionArea 42 { 43 public: 44 ProtectionArea( 45 const char * i_sLabel, 46 const char * i_sTitle ); 47 ~ProtectionArea(); 48 49 csi::html::Table & GetTable(); 50 csi::html::Table & GetTable( 51 ary::cpp::E_ClassKey 52 i_eClassKey ); 53 DYN csi::html::Table * ReleaseTable(); 54 DYN csi::html::Table * ReleaseTable( 55 ary::cpp::E_ClassKey 56 i_eClassKey ); 57 const char * Label() const; 58 Size() const59 int Size() const { return pSglTable ? 1 : 3; } 60 61 bool WasUsed_Area() const; 62 private: 63 struct S_Slot_Table 64 { 65 const char * sTableTitle; 66 Dyn< csi::html::Table > 67 pTable; 68 69 S_Slot_Table( 70 const char * i_sTitle ); 71 ~S_Slot_Table(); 72 csi::html::Table & GetTable(); 73 DYN csi::html::Table * ReleaseTableProtectionArea::S_Slot_Table74 ReleaseTable() { return pTable.Release(); } WasUsedProtectionArea::S_Slot_Table75 bool WasUsed() const { return pTable; } 76 }; 77 78 UINT8 Index( 79 ary::cpp::E_ClassKey 80 i_eClassKey ) const; 81 // DATA 82 Dyn<S_Slot_Table> pSglTable; 83 Dyn<S_Slot_Table> aClassesTables[3]; 84 const char * sLabel; 85 }; 86 87 88 89 #endif 90 91