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 module com
{ module sun
{ module star
{ module script
{ module provider
{
24 This interface represents an invocable script or UNO function.
26 interface XScript
: ::com
::sun
::star
::uno
::XInterface
{
29 invoke the script or function represented by the implementing
33 all parameters; pure, out parameters are undefined in sequence,
34 i.e., the value has to be ignored by the callee
36 out indices, indicating the position of the out or inout
37 parameters in the list of arguments to the script
40 For example, if the script had the signature<br>
41 <code>long foo( [inout] string a, [in] string b, [out] string c )</code>
42 <br> the call would look like<br>
43 <code>bar.invoke( {"foo", "foo2", "this-is-ignored" }, aOutParamIndex, aOutParam);</code>
44 <br> and after the call the out sequences would contain<br>
47 aOutParam={"string from a", "string from c"};
51 the value returned from the function being invoked
53 @throws ::com::sun::star::reflection::InvocationTargetException
54 if an error occurs while attempting to invoke a script the information is captured. If the error or exception is generated by the script itself it is wrapped as either ScriptErrorRaisedException or ScriptExceptionRaisedException or ScriptFrameworkErrorException are wrapped as ScriptFrameworkErrorExceptions.
57 [in] sequence
<any
> aParams
,
58 [out] sequence
<short> aOutParamIndex
,
59 [out] sequence
<any
> aOutParam
) raises
(
60 ::com
::sun
::star
::script
::provider
::ScriptFrameworkErrorException
,
61 ::com
::sun
::star
::reflection
::InvocationTargetException
);
65 }; }; }; }; }; // ::com::sun::star::script::provider
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */