1*d291ea28SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d291ea28SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d291ea28SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d291ea28SAndrew Rist  * distributed with this work for additional information
6*d291ea28SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d291ea28SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d291ea28SAndrew Rist  * "License"); you may not use this file except in compliance
9*d291ea28SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d291ea28SAndrew Rist  *
11*d291ea28SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d291ea28SAndrew Rist  *
13*d291ea28SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d291ea28SAndrew Rist  * software distributed under the License is distributed on an
15*d291ea28SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d291ea28SAndrew Rist  * KIND, either express or implied.  See the License for the
17*d291ea28SAndrew Rist  * specific language governing permissions and limitations
18*d291ea28SAndrew Rist  * under the License.
19*d291ea28SAndrew Rist  *
20*d291ea28SAndrew Rist  *************************************************************/
21cdf0e10cSrcweir 
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include <ary/idl/i_sisingleton.hxx>
24cdf0e10cSrcweir 
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // NOT FULLY DECLARED SERVICES
27cdf0e10cSrcweir #include <cosv/tpl/processor.hxx>
28cdf0e10cSrcweir #include <ary/idl/ik_sisingleton.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir 
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace ary
33cdf0e10cSrcweir {
34cdf0e10cSrcweir namespace idl
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 
SglIfcSingleton(const String & i_sName,Ce_id i_nOwner,Type_id i_nBaseInterface)37cdf0e10cSrcweir SglIfcSingleton::SglIfcSingleton( const String &      i_sName,
38cdf0e10cSrcweir                                   Ce_id               i_nOwner,
39cdf0e10cSrcweir                                   Type_id             i_nBaseInterface )
40cdf0e10cSrcweir     :   sName(i_sName),
41cdf0e10cSrcweir         nOwner(i_nOwner),
42cdf0e10cSrcweir         nBaseInterface(i_nBaseInterface)
43cdf0e10cSrcweir {
44cdf0e10cSrcweir }
45cdf0e10cSrcweir 
~SglIfcSingleton()46cdf0e10cSrcweir SglIfcSingleton::~SglIfcSingleton()
47cdf0e10cSrcweir {
48cdf0e10cSrcweir }
49cdf0e10cSrcweir 
50cdf0e10cSrcweir void
do_Accept(csv::ProcessorIfc & io_processor) const51cdf0e10cSrcweir SglIfcSingleton::do_Accept( csv::ProcessorIfc & io_processor ) const
52cdf0e10cSrcweir {
53cdf0e10cSrcweir     csv::CheckedCall(io_processor, *this);
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56cdf0e10cSrcweir ClassId
get_AryClass() const57cdf0e10cSrcweir SglIfcSingleton::get_AryClass() const
58cdf0e10cSrcweir {
59cdf0e10cSrcweir     return class_id;
60cdf0e10cSrcweir }
61cdf0e10cSrcweir 
62cdf0e10cSrcweir const String &
inq_LocalName() const63cdf0e10cSrcweir SglIfcSingleton::inq_LocalName() const
64cdf0e10cSrcweir {
65cdf0e10cSrcweir     return sName;
66cdf0e10cSrcweir }
67cdf0e10cSrcweir 
68cdf0e10cSrcweir Ce_id
inq_NameRoom() const69cdf0e10cSrcweir SglIfcSingleton::inq_NameRoom() const
70cdf0e10cSrcweir {
71cdf0e10cSrcweir     return nOwner;
72cdf0e10cSrcweir }
73cdf0e10cSrcweir 
74cdf0e10cSrcweir Ce_id
inq_Owner() const75cdf0e10cSrcweir SglIfcSingleton::inq_Owner() const
76cdf0e10cSrcweir {
77cdf0e10cSrcweir     return nOwner;
78cdf0e10cSrcweir }
79cdf0e10cSrcweir 
80cdf0e10cSrcweir E_SightLevel
inq_SightLevel() const81cdf0e10cSrcweir SglIfcSingleton::inq_SightLevel() const
82cdf0e10cSrcweir {
83cdf0e10cSrcweir     return sl_File;
84cdf0e10cSrcweir }
85cdf0e10cSrcweir 
86cdf0e10cSrcweir namespace ifc_sglifcsingleton
87cdf0e10cSrcweir {
88cdf0e10cSrcweir 
89cdf0e10cSrcweir inline const SglIfcSingleton &
sglifcsingleton_cast(const CodeEntity & i_ce)90cdf0e10cSrcweir sglifcsingleton_cast( const CodeEntity &  i_ce )
91cdf0e10cSrcweir {
92cdf0e10cSrcweir     csv_assert( i_ce.AryClass() == SglIfcSingleton::class_id );
93cdf0e10cSrcweir 	return static_cast< const SglIfcSingleton& >(i_ce);
94cdf0e10cSrcweir }
95cdf0e10cSrcweir 
96cdf0e10cSrcweir Type_id
BaseInterface(const CodeEntity & i_ce)97cdf0e10cSrcweir attr::BaseInterface( const CodeEntity & i_ce )
98cdf0e10cSrcweir {
99cdf0e10cSrcweir     return sglifcsingleton_cast(i_ce).nBaseInterface;
100cdf0e10cSrcweir }
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 
103cdf0e10cSrcweir } // namespace ifc_sglifcsingleton
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 
106cdf0e10cSrcweir }   //  namespace   idl
107cdf0e10cSrcweir }   //  namespace   ary
108