UNOIDL: [in] and [out] method parameter flag usage?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Koa
Posts: 12
Joined: Sun Jan 15, 2017 11:53 pm

UNOIDL: [in] and [out] method parameter flag usage?

Post by Koa »

What do

Code: Select all

[in]
and

Code: Select all

[out]
parameter flags mean?

I'm working with Basic (Star Office Basic and Libre Office Basic) and learning to use the MRI (My Reflection and Introspection) tool to view the Methods of a given target.

Where MRI lists Methods I'm seeing that those which require parameters have either an [in], [out], (or possibly even [inout]) prefixing a parameter's type. Here is an example display from MRI:

Image

Here's what I've learned so far:

The UNOIDL (the Unified Network Objects Interface Definition Language) https://www.openoffice.org/udk/common/man/idl.html mentions these as parameter flags, in the "Interface" syntax description:
<parameter> = "[" in | out | inout "]" <typename> <parametername> The parameter definition begins with the direction flag which is bound with [ ]. Valid flags for the direction are in ( in parameter), out (out parameter) or inout (in and out parameter). The direction follows an identifier for the parameter type and an identifier for the parameter name. More than one parameter definitions are separated by comma.
At the bottom of this https://wiki.openoffice.org/wiki/Docume ... Interfaces page it talks about these flags:
There are also parameter flags. Each parameter definition begins with one of the direction flags in, out, or inout to specify the use of the parameter:

in specifies that the parameter will be used as an input parameter

only out specifies that the parameter will be used as an output parameter only inout specifies that the parameter will be used as an input and output parameter

These parameter flags do not appear in the API reference. The fact that a parameter is an [out] or [inout] parameter is explained in the method details.
Unfortunately when I refer to an example IDL reference manual page http://www.openoffice.org/api/docs/comm ... nsAndLines, it does not explain the [out] flag.
LibreOffice 5.2.5.1 on Linux Jessie 8.6
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: UNOIDL: [in] and [out] method parameter flag usage?

Post by floris v »

Also asked at https://ask.libreoffice.org/en/question ... lag-usage/

We urge people, when they cross post, to post links to the other locations to prevent many discussions of the same subject.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Post Reply