1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include <precomp.h>
29 #include <ary/idl/i_siservice.hxx>
30 #include <ary/idl/ik_siservice.hxx>
31 
32 
33 // NOT FULLY DECLARED SERVICES
34 #include <cosv/tpl/processor.hxx>
35 #include <sci_impl.hxx>
36 
37 
38 namespace ary
39 {
40 namespace idl
41 {
42 
43 SglIfcService::SglIfcService( const String &      i_sName,
44                               Ce_id               i_nOwner,
45                               Type_id             i_nBaseInterface )
46     :   sName(i_sName),
47         nOwner(i_nOwner),
48         nBaseInterface(i_nBaseInterface),
49         aConstructors()
50 {
51 }
52 
53 SglIfcService::~SglIfcService()
54 {
55 }
56 
57 void
58 SglIfcService::do_Accept( csv::ProcessorIfc & io_processor ) const
59 {
60     csv::CheckedCall(io_processor, *this);
61 }
62 
63 ClassId
64 SglIfcService::get_AryClass() const
65 {
66     return class_id;
67 }
68 
69 const String &
70 SglIfcService::inq_LocalName() const
71 {
72     return sName;
73 }
74 
75 Ce_id
76 SglIfcService::inq_NameRoom() const
77 {
78     return nOwner;
79 }
80 
81 Ce_id
82 SglIfcService::inq_Owner() const
83 {
84     return nOwner;
85 }
86 
87 E_SightLevel
88 SglIfcService::inq_SightLevel() const
89 {
90     return sl_File;
91 }
92 
93 
94 namespace ifc_sglifcservice
95 {
96 
97 inline const SglIfcService &
98 sglifcservice_cast( const CodeEntity &  i_ce )
99 {
100     csv_assert( i_ce.AryClass() == SglIfcService::class_id );
101 	return static_cast< const SglIfcService& >(i_ce);
102 }
103 
104 Type_id
105 attr::BaseInterface( const CodeEntity & i_ce )
106 {
107     return sglifcservice_cast(i_ce).nBaseInterface;
108 }
109 
110 void
111 attr::Get_Constructors( Dyn_CeIterator &    o_result,
112                         const CodeEntity &	i_ce )
113 {
114     o_result = new SCI_Vector<Ce_id>( sglifcservice_cast(i_ce).aConstructors );
115 }
116 
117 } // namespace ifc_sglifcservice
118 
119 
120 }   //  namespace   idl
121 }   //  namespace   ary
122