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_function.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_function.hxx>
35 // NOT FULLY DECLARED SERVICES
36 #include <cosv/tpl/processor.hxx>
37 #include <sci_impl.hxx>
46 Function::Function( const String
& i_sName
,
49 Type_id i_nReturnType
,
53 nNameRoom(i_nNameRoom
),
54 nReturnType(i_nReturnType
),
62 Function::Function( const String
& i_sName
,
67 nNameRoom(i_nNameRoom
),
81 Function::do_Accept( csv::ProcessorIfc
& io_processor
) const
83 csv::CheckedCall(io_processor
, *this);
87 Function::get_AryClass() const
93 Function::inq_LocalName() const
99 Function::inq_NameRoom() const
105 Function::inq_Owner() const
111 Function::inq_SightLevel() const
117 namespace ifc_function
120 inline const Function
&
121 function_cast( const CodeEntity
& i_ce
)
123 csv_assert( i_ce
.AryClass() == Function::class_id
);
124 return static_cast< const Function
& >(i_ce
);
128 attr::ReturnType( const CodeEntity
& i_ce
)
130 return function_cast(i_ce
).nReturnType
;
134 attr::IsOneway( const CodeEntity
& i_ce
)
136 return function_cast(i_ce
).bOneWay
;
140 attr::HasEllipse( const CodeEntity
& i_ce
)
142 return function_cast(i_ce
).bEllipse
;
146 attr::Get_Parameters( Dyn_StdConstIterator
<ary::idl::Parameter
> & o_result
,
147 const CodeEntity
& i_ce
)
150 = new SCI_Vector
<Parameter
>( function_cast(i_ce
).aParameters
);
154 attr::Get_Exceptions( Dyn_TypeIterator
& o_result
,
155 const CodeEntity
& i_ce
)
158 = new SCI_Vector
<Type_id
>( function_cast(i_ce
).aExceptions
);
165 } // namespace ifc_function