Bump for 3.6-28
[LibreOffice.git] / autodoc / source / ary / idl / i_function.cxx
blob4d9375d3451e81725af4c70236357eee65c6de46
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 ************************************************************************/
29 #include <precomp.h>
30 #include <ary/idl/i_function.hxx>
33 // NOT FULLY DECLARED SERVICES
34 #include <cosv/tpl/processor.hxx>
35 #include <sci_impl.hxx>
39 namespace ary
41 namespace idl
44 Function::Function( const String & i_sName,
45 Ce_id i_nOwner,
46 Ce_id i_nNameRoom,
47 Type_id i_nReturnType,
48 bool i_bOneWay )
49 : sName(i_sName),
50 nOwner(i_nOwner),
51 nNameRoom(i_nNameRoom),
52 nReturnType(i_nReturnType),
53 aParameters(),
54 aExceptions(),
55 bOneWay(i_bOneWay),
56 bEllipse(false)
60 Function::Function( const String & i_sName,
61 Ce_id i_nOwner,
62 Ce_id i_nNameRoom )
63 : sName(i_sName),
64 nOwner(i_nOwner),
65 nNameRoom(i_nNameRoom),
66 nReturnType(0),
67 aParameters(),
68 aExceptions(),
69 bOneWay(false),
70 bEllipse(false)
74 Function::~Function()
78 void
79 Function::do_Accept( csv::ProcessorIfc & io_processor ) const
81 csv::CheckedCall(io_processor, *this);
84 ClassId
85 Function::get_AryClass() const
87 return class_id;
90 const String &
91 Function::inq_LocalName() const
93 return sName;
96 Ce_id
97 Function::inq_NameRoom() const
99 return nNameRoom;
102 Ce_id
103 Function::inq_Owner() const
105 return nOwner;
108 E_SightLevel
109 Function::inq_SightLevel() const
111 return sl_Member;
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);
125 Type_id
126 attr::ReturnType( const CodeEntity & i_ce )
128 return function_cast(i_ce).nReturnType;
131 bool
132 attr::IsOneway( const CodeEntity & i_ce )
134 return function_cast(i_ce).bOneWay;
137 bool
138 attr::HasEllipse( const CodeEntity & i_ce )
140 return function_cast(i_ce).bEllipse;
143 void
144 attr::Get_Parameters( Dyn_StdConstIterator<ary::idl::Parameter> & o_result,
145 const CodeEntity & i_ce )
147 o_result
148 = new SCI_Vector<Parameter>( function_cast(i_ce).aParameters );
151 void
152 attr::Get_Exceptions( Dyn_TypeIterator & o_result,
153 const CodeEntity & i_ce )
155 o_result
156 = new SCI_Vector<Type_id>( function_cast(i_ce).aExceptions );
163 } // namespace ifc_function
165 } // namespace idl
166 } // namespace ary
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */