Issue 75053 - Language binding support for service contstructors
Summary: Language binding support for service contstructors
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2007-03-02 09:39 UTC by Stephan Bergmann
Modified: 2017-05-20 11:31 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2007-03-02 09:39:36 UTC
UNO "new style" service constructors

  service S: X { ctor([in] T1 a1, ...) raises (E1, E2); };

are currently a thin wrapper around[ArgumentsAnd]Context,
where the Arguments-version internally uses 
That has at least two drawbacks:

1  Multiple constructors need to have different argument signatures (this is
even enforced in UNOIDL and idlc), so that the service implementation can
discriminate the various constructors.

2  XInitialization is called on a completed object, so implementations need to
take care of their potentially half-initialized state, which makes them more
complex than necessary.
Comment 1 Stephan Bergmann 2007-03-02 09:43:03 UTC
...the idea is to improve this by offering direct support in the UNO language
bindings (like mapping UNO service constructors directly to Java class
Comment 2 Daniel Boelzle [:dbo] 2007-03-02 10:10:31 UTC
Just a note/suggestion about -2- which might be helpful:
Omitting the need to implement lang::XInitialization, I have developed a
solution in comphelper/servicedecl.hxx some time ago. The factory object maps
all IDL ctors (with arguments) to a single C++ ctor(args, context). Together
with a type-safe helper to unwrap the arguments (comphelper/unwrapargs.hxx),
implementing a service ctor is pretty slim and all init code could be done in
the ctor.
Comment 3 Martin Hollmichel 2007-12-07 13:00:32 UTC
set target to 3.x according to
Comment 4 Marcus 2017-05-20 11:31:34 UTC
Reset assigne to the default "".