1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <ary/idl/i_function.hxx>
24 // NOT FULLY DECLARED SERVICES
25 #include <cosv/tpl/processor.hxx>
26 #include <sci_impl.hxx>
35 Function::Function( const String
& i_sName
,
38 Type_id i_nReturnType
,
42 nNameRoom(i_nNameRoom
),
43 nReturnType(i_nReturnType
),
51 Function::Function( const String
& i_sName
,
56 nNameRoom(i_nNameRoom
),
70 Function::do_Accept( csv::ProcessorIfc
& io_processor
) const
72 csv::CheckedCall(io_processor
, *this);
76 Function::get_AryClass() const
82 Function::inq_LocalName() const
88 Function::inq_NameRoom() const
94 Function::inq_Owner() const
100 Function::inq_SightLevel() const
106 namespace ifc_function
109 inline const Function
&
110 function_cast( const CodeEntity
& i_ce
)
112 csv_assert( i_ce
.AryClass() == Function::class_id
);
113 return static_cast< const Function
& >(i_ce
);
117 attr::ReturnType( const CodeEntity
& i_ce
)
119 return function_cast(i_ce
).nReturnType
;
123 attr::IsOneway( const CodeEntity
& i_ce
)
125 return function_cast(i_ce
).bOneWay
;
129 attr::HasEllipse( const CodeEntity
& i_ce
)
131 return function_cast(i_ce
).bEllipse
;
135 attr::Get_Parameters( Dyn_StdConstIterator
<ary::idl::Parameter
> & o_result
,
136 const CodeEntity
& i_ce
)
139 = new SCI_Vector
<Parameter
>( function_cast(i_ce
).aParameters
);
143 attr::Get_Exceptions( Dyn_TypeIterator
& o_result
,
144 const CodeEntity
& i_ce
)
147 = new SCI_Vector
<Type_id
>( function_cast(i_ce
).aExceptions
);
154 } // namespace ifc_function
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */