1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i_interface.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #include <ary/idl/i_interface.hxx>
35 // NOT FULLY DECLARED SERVICES
36 #include <cosv/tpl/processor.hxx>
37 #include <ary/idl/ik_interface.hxx>
38 #include <ary/doc/d_oldidldocu.hxx>
39 #include <sci_impl.hxx>
40 #include "i2s_calculator.hxx"
54 Interface::Interface( const String
& i_sName
,
65 Interface::~Interface()
67 for ( RelationList::iterator it
= aBases
.begin();
76 Interface::do_Accept( csv::ProcessorIfc
& io_processor
) const
78 csv::CheckedCall(io_processor
, *this);
82 Interface::get_AryClass() const
88 Interface::inq_LocalName() const
94 Interface::inq_NameRoom() const
100 Interface::inq_Owner() const
106 Interface::inq_SightLevel() const
112 namespace ifc_interface
115 inline const Interface
&
116 interface_cast( const CodeEntity
& i_ce
)
118 csv_assert( i_ce
.AryClass() == Interface::class_id
);
119 return static_cast< const Interface
& >(i_ce
);
123 attr::Get_Bases( Dyn_StdConstIterator
<CommentedRelation
> & o_result
,
124 const CodeEntity
& i_ce
)
126 o_result
= new SCI_Vector
<CommentedRelation
>(interface_cast(i_ce
).aBases
);
130 attr::Get_Functions( Dyn_CeIterator
& o_result
,
131 const CodeEntity
& i_ce
)
133 o_result
= new SCI_Vector
<Ce_id
>(interface_cast(i_ce
).aFunctions
);
137 attr::Get_Attributes( Dyn_CeIterator
& o_result
,
138 const CodeEntity
& i_ce
)
140 o_result
= new SCI_Vector
<Ce_id
>(interface_cast(i_ce
).aAttributes
);
144 xref::Get_Derivations( Dyn_CeIterator
& o_result
,
145 const CodeEntity
& i_ce
)
147 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_Derivations
));
151 xref::Get_SynonymTypedefs( Dyn_CeIterator
& o_result
,
152 const CodeEntity
& i_ce
)
154 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_SynonymTypedefs
));
158 xref::Get_ExportingServices( Dyn_CeIterator
& o_result
,
159 const CodeEntity
& i_ce
)
161 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_ExportingServices
));
165 xref::Get_ExportingSingletons( Dyn_CeIterator
& o_result
,
166 const CodeEntity
& i_ce
)
168 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_ExportingSingletons
));
172 xref::Get_AsReturns( Dyn_CeIterator
& o_result
,
173 const CodeEntity
& i_ce
)
175 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_AsReturns
));
179 xref::Get_AsParameters( Dyn_CeIterator
& o_result
,
180 const CodeEntity
& i_ce
)
182 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_AsParameters
));
186 xref::Get_AsDataTypes( Dyn_CeIterator
& o_result
,
187 const CodeEntity
& i_ce
)
189 o_result
= new SCI_Vector
<Ce_id
>(i_ce
.Secondaries().List(interface_2s_AsDataTypes
));
195 } // namespace ifc_interface