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_sisingleton.hxx>
24
25
26 // NOT FULLY DECLARED SERVICES
27 #include <cosv/tpl/processor.hxx>
28 #include <ary/idl/ik_sisingleton.hxx>
29
30
31
32 namespace ary
33 {
34 namespace idl
35 {
36
SglIfcSingleton(const String & i_sName,Ce_id i_nOwner,Type_id i_nBaseInterface)37 SglIfcSingleton::SglIfcSingleton( 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 {
44 }
45
~SglIfcSingleton()46 SglIfcSingleton::~SglIfcSingleton()
47 {
48 }
49
50 void
do_Accept(csv::ProcessorIfc & io_processor) const51 SglIfcSingleton::do_Accept( csv::ProcessorIfc & io_processor ) const
52 {
53 csv::CheckedCall(io_processor, *this);
54 }
55
56 ClassId
get_AryClass() const57 SglIfcSingleton::get_AryClass() const
58 {
59 return class_id;
60 }
61
62 const String &
inq_LocalName() const63 SglIfcSingleton::inq_LocalName() const
64 {
65 return sName;
66 }
67
68 Ce_id
inq_NameRoom() const69 SglIfcSingleton::inq_NameRoom() const
70 {
71 return nOwner;
72 }
73
74 Ce_id
inq_Owner() const75 SglIfcSingleton::inq_Owner() const
76 {
77 return nOwner;
78 }
79
80 E_SightLevel
inq_SightLevel() const81 SglIfcSingleton::inq_SightLevel() const
82 {
83 return sl_File;
84 }
85
86 namespace ifc_sglifcsingleton
87 {
88
89 inline const SglIfcSingleton &
sglifcsingleton_cast(const CodeEntity & i_ce)90 sglifcsingleton_cast( const CodeEntity & i_ce )
91 {
92 csv_assert( i_ce.AryClass() == SglIfcSingleton::class_id );
93 return static_cast< const SglIfcSingleton& >(i_ce);
94 }
95
96 Type_id
BaseInterface(const CodeEntity & i_ce)97 attr::BaseInterface( const CodeEntity & i_ce )
98 {
99 return sglifcsingleton_cast(i_ce).nBaseInterface;
100 }
101
102
103 } // namespace ifc_sglifcsingleton
104
105
106 } // namespace idl
107 } // namespace ary
108