fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / autodoc / inc / ary / idl / i_function.hxx
blobeae31997feb104b361568ac10bbed45ad82e222b
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 #ifndef ARY_IDL_I_FUNCTION_HXX
21 #define ARY_IDL_I_FUNCTION_HXX
23 // BASE CLASSES
24 #include <ary/idl/i_ce.hxx>
26 // USED SERVICES
27 #include <ary/idl/i_param.hxx>
28 #include <ary/idl/ik_function.hxx>
29 #include <ary/stdconstiter.hxx>
34 namespace ary
36 namespace idl
40 /** Represents an IDL function.
42 Special case constructor:
43 Constructors have return type "0".
45 class Function : public CodeEntity
47 public:
48 enum E_ClassId { class_id = 2002 };
50 typedef std::vector< Parameter > ParamList;
51 typedef std::vector< Type_id > ExceptionList;
53 // LIFECYCLE
54 /// Normal function
55 Function(
56 const String & i_sName,
57 Ce_id i_nOwner,
58 Ce_id i_nNameRoom,
59 Type_id i_nReturnType,
60 bool i_bOneWay );
61 /// Constructor
62 Function(
63 const String & i_sName,
64 Ce_id i_nOwner,
65 Ce_id i_nNameRoom );
66 ~Function();
68 // OPERATIONS
69 void Add_Parameter(
70 const String & i_sName,
71 Type_id i_nType,
72 E_ParameterDirection
73 i_eDirection );
74 /// The function's parameter list ends with the ellipse "..." .
75 void Set_Ellipse();
76 void Add_Exception(
77 Type_id i_nException );
79 // INQUIRY
80 Type_id ReturnType() const;
81 const ParamList & Parameters() const { return aParameters; }
82 const ExceptionList &
83 Exceptions() const { return aExceptions; }
84 bool IsOneway() const;
85 bool HasEllipse() const { return bEllipse; }
87 private:
88 // Interface csv::ConstProcessorClient:
89 virtual void do_Accept(
90 csv::ProcessorIfc & io_processor ) const;
91 // Interface ary::Object:
92 virtual ClassId get_AryClass() const;
94 // Interface CodeEntity
95 virtual const String & inq_LocalName() const;
96 virtual Ce_id inq_NameRoom() const;
97 virtual Ce_id inq_Owner() const;
98 virtual E_SightLevel inq_SightLevel() const;
100 // Locals
101 friend struct ifc_function::attr;
103 // DATA
104 String sName;
105 Ce_id nOwner;
106 Ce_id nNameRoom;
108 Type_id nReturnType;
109 ParamList aParameters;
110 ExceptionList aExceptions;
111 bool bOneWay;
112 bool bEllipse;
118 // IMPLEMENTATION
119 inline void
120 Function::Add_Parameter( const String & i_sName,
121 Type_id i_nType,
122 E_ParameterDirection i_eDirection )
124 aParameters.push_back( Parameter(i_sName,i_nType,i_eDirection) );
127 inline void
128 Function::Set_Ellipse()
130 bEllipse = true;
133 inline void
134 Function::Add_Exception( Type_id i_nException )
136 aExceptions.push_back(i_nException);
139 inline Type_id
140 Function::ReturnType() const
141 { return nReturnType; }
143 inline bool
144 Function::IsOneway() const
145 { return bOneWay; }
150 } // namespace idl
151 } // namespace ary
152 #endif
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */