1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include <ary/idl/i_function.hxx>
33 // NOT FULLY DECLARED SERVICES
34 #include <cosv/tpl/processor.hxx>
35 #include <sci_impl.hxx>
44 Function::Function( const String
& i_sName
,
47 Type_id i_nReturnType
,
51 nNameRoom(i_nNameRoom
),
52 nReturnType(i_nReturnType
),
60 Function::Function( const String
& i_sName
,
65 nNameRoom(i_nNameRoom
),
79 Function::do_Accept( csv::ProcessorIfc
& io_processor
) const
81 csv::CheckedCall(io_processor
, *this);
85 Function::get_AryClass() const
91 Function::inq_LocalName() const
97 Function::inq_NameRoom() const
103 Function::inq_Owner() const
109 Function::inq_SightLevel() const
115 namespace ifc_function
118 inline const Function
&
119 function_cast( const CodeEntity
& i_ce
)
121 csv_assert( i_ce
.AryClass() == Function::class_id
);
122 return static_cast< const Function
& >(i_ce
);
126 attr::ReturnType( const CodeEntity
& i_ce
)
128 return function_cast(i_ce
).nReturnType
;
132 attr::IsOneway( const CodeEntity
& i_ce
)
134 return function_cast(i_ce
).bOneWay
;
138 attr::HasEllipse( const CodeEntity
& i_ce
)
140 return function_cast(i_ce
).bEllipse
;
144 attr::Get_Parameters( Dyn_StdConstIterator
<ary::idl::Parameter
> & o_result
,
145 const CodeEntity
& i_ce
)
148 = new SCI_Vector
<Parameter
>( function_cast(i_ce
).aParameters
);
152 attr::Get_Exceptions( Dyn_TypeIterator
& o_result
,
153 const CodeEntity
& i_ce
)
156 = new SCI_Vector
<Type_id
>( function_cast(i_ce
).aExceptions
);
163 } // namespace ifc_function
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */