update credits
[LibreOffice.git] / autodoc / source / ary / idl / i_function.cxx
blob084b91ecbad1c1cfc1e27febc4ca272ef76879a0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include <precomp.h>
21 #include <ary/idl/i_function.hxx>
24 // NOT FULLY DECLARED SERVICES
25 #include <cosv/tpl/processor.hxx>
26 #include <sci_impl.hxx>
30 namespace ary
32 namespace idl
35 Function::Function( const String & i_sName,
36 Ce_id i_nOwner,
37 Ce_id i_nNameRoom,
38 Type_id i_nReturnType,
39 bool i_bOneWay )
40 : sName(i_sName),
41 nOwner(i_nOwner),
42 nNameRoom(i_nNameRoom),
43 nReturnType(i_nReturnType),
44 aParameters(),
45 aExceptions(),
46 bOneWay(i_bOneWay),
47 bEllipse(false)
51 Function::Function( const String & i_sName,
52 Ce_id i_nOwner,
53 Ce_id i_nNameRoom )
54 : sName(i_sName),
55 nOwner(i_nOwner),
56 nNameRoom(i_nNameRoom),
57 nReturnType(0),
58 aParameters(),
59 aExceptions(),
60 bOneWay(false),
61 bEllipse(false)
65 Function::~Function()
69 void
70 Function::do_Accept( csv::ProcessorIfc & io_processor ) const
72 csv::CheckedCall(io_processor, *this);
75 ClassId
76 Function::get_AryClass() const
78 return class_id;
81 const String &
82 Function::inq_LocalName() const
84 return sName;
87 Ce_id
88 Function::inq_NameRoom() const
90 return nNameRoom;
93 Ce_id
94 Function::inq_Owner() const
96 return nOwner;
99 E_SightLevel
100 Function::inq_SightLevel() const
102 return sl_Member;
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);
116 Type_id
117 attr::ReturnType( const CodeEntity & i_ce )
119 return function_cast(i_ce).nReturnType;
122 bool
123 attr::IsOneway( const CodeEntity & i_ce )
125 return function_cast(i_ce).bOneWay;
128 bool
129 attr::HasEllipse( const CodeEntity & i_ce )
131 return function_cast(i_ce).bEllipse;
134 void
135 attr::Get_Parameters( Dyn_StdConstIterator<ary::idl::Parameter> & o_result,
136 const CodeEntity & i_ce )
138 o_result
139 = new SCI_Vector<Parameter>( function_cast(i_ce).aParameters );
142 void
143 attr::Get_Exceptions( Dyn_TypeIterator & o_result,
144 const CodeEntity & i_ce )
146 o_result
147 = new SCI_Vector<Type_id>( function_cast(i_ce).aExceptions );
154 } // namespace ifc_function
156 } // namespace idl
157 } // namespace ary
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */