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 <ary/idl/i_siservice.hxx> 24 #include <ary/idl/ik_siservice.hxx> 25 26 27 // NOT FULLY DECLARED SERVICES 28 #include <cosv/tpl/processor.hxx> 29 #include <sci_impl.hxx> 30 31 32 namespace ary 33 { 34 namespace idl 35 { 36 37 SglIfcService::SglIfcService( const String & i_sName, 38 Ce_id i_nOwner, 39 Type_id i_nBaseInterface ) 40 : sName(i_sName), 41 nOwner(i_nOwner), 42 nBaseInterface(i_nBaseInterface), 43 aConstructors() 44 { 45 } 46 47 SglIfcService::~SglIfcService() 48 { 49 } 50 51 void 52 SglIfcService::do_Accept( csv::ProcessorIfc & io_processor ) const 53 { 54 csv::CheckedCall(io_processor, *this); 55 } 56 57 ClassId 58 SglIfcService::get_AryClass() const 59 { 60 return class_id; 61 } 62 63 const String & 64 SglIfcService::inq_LocalName() const 65 { 66 return sName; 67 } 68 69 Ce_id 70 SglIfcService::inq_NameRoom() const 71 { 72 return nOwner; 73 } 74 75 Ce_id 76 SglIfcService::inq_Owner() const 77 { 78 return nOwner; 79 } 80 81 E_SightLevel 82 SglIfcService::inq_SightLevel() const 83 { 84 return sl_File; 85 } 86 87 88 namespace ifc_sglifcservice 89 { 90 91 inline const SglIfcService & 92 sglifcservice_cast( const CodeEntity & i_ce ) 93 { 94 csv_assert( i_ce.AryClass() == SglIfcService::class_id ); 95 return static_cast< const SglIfcService& >(i_ce); 96 } 97 98 Type_id 99 attr::BaseInterface( const CodeEntity & i_ce ) 100 { 101 return sglifcservice_cast(i_ce).nBaseInterface; 102 } 103 104 void 105 attr::Get_Constructors( Dyn_CeIterator & o_result, 106 const CodeEntity & i_ce ) 107 { 108 o_result = new SCI_Vector<Ce_id>( sglifcservice_cast(i_ce).aConstructors ); 109 } 110 111 } // namespace ifc_sglifcservice 112 113 114 } // namespace idl 115 } // namespace ary 116