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 #include <precomp.h> 23 #include <slots.hxx> 24 25 26 // NOT FULLY DEFINED SERVICES 27 #include <ary/ary_disp.hxx> 28 29 30 31 namespace ary 32 { 33 34 35 //*********************** Slot ********************// 36 37 38 void 39 Slot::StoreAt( Display & o_rDestination ) const 40 { 41 o_rDestination.StartSlot(); 42 StoreEntries(o_rDestination); 43 o_rDestination.FinishSlot(); 44 } 45 46 47 //*********************** Slot_Null ********************// 48 49 Slot_Null::~Slot_Null() 50 { 51 } 52 53 void 54 Slot_Null::StoreAt( Display & ) const 55 { 56 // Does nothing 57 } 58 59 uintt 60 Slot_Null::Size() const 61 { 62 return 0; 63 } 64 65 void 66 Slot_Null::StoreEntries( Display & ) const 67 { 68 // Does nothing 69 } 70 71 //*********************** Slot_MapLocalCe ********************// 72 73 Slot_MapLocalCe::Slot_MapLocalCe( const cpp::Map_LocalCe & i_rData ) 74 : pData(&i_rData) 75 { 76 } 77 78 Slot_MapLocalCe::~Slot_MapLocalCe() 79 { 80 } 81 82 uintt 83 Slot_MapLocalCe::Size() const 84 { 85 return pData->size();; 86 } 87 88 void 89 Slot_MapLocalCe::StoreEntries( Display & o_rDestination ) const 90 { 91 for ( cpp::Map_LocalCe::const_iterator it = pData->begin(); 92 it != pData->end(); 93 ++it ) 94 { 95 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first ); 96 } 97 } 98 99 100 101 //*********************** Slot_MapOperations ********************// 102 103 Slot_MapOperations::Slot_MapOperations( const std::multimap<String, cpp::Ce_id> & i_rData ) 104 : pData(&i_rData) 105 { 106 } 107 108 Slot_MapOperations::~Slot_MapOperations() 109 { 110 } 111 112 uintt 113 Slot_MapOperations::Size() const 114 { 115 return pData->size();; 116 } 117 118 void 119 Slot_MapOperations::StoreEntries( Display & o_rDestination ) const 120 { 121 for ( std::multimap<String, cpp::Ce_id>::const_iterator it = pData->begin(); 122 it != pData->end(); 123 ++it ) 124 { 125 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first ); 126 } 127 } 128 129 //*********************** Slot_ListLocalCe ********************// 130 131 Slot_ListLocalCe::Slot_ListLocalCe( const cpp::List_LocalCe & i_rData ) 132 : pData(&i_rData) 133 { 134 } 135 136 Slot_ListLocalCe::~Slot_ListLocalCe() 137 { 138 } 139 140 uintt 141 Slot_ListLocalCe::Size() const 142 { 143 return pData->size();; 144 } 145 146 void 147 Slot_ListLocalCe::StoreEntries( Display & o_rDestination ) const 148 { 149 for ( cpp::List_LocalCe::const_iterator it = pData->begin(); 150 it != pData->end(); 151 ++it ) 152 { 153 o_rDestination.DisplaySlot_LocalCe( (*it).nId, (*it).sLocalName ); 154 } 155 } 156 157 158 } // namespace ary 159