Ok, for the nitpickers:
Something* pS = NULL;
css::uno::Reference<XSomething> x( ps = new Something() );
pS->privateNonUnoFunction();
;-)
Kind regards, pl
Stephan Bergmann wrote:
Philipp Lohmann wrote:
Hi,
regarding that example I would normally do
Something* pS = new Something();
css::uno::Reference<XSomething> x( pS );
pS->privateNonUnoFunction();
I would consider the approach I showed below more robust (code that can
throw slipping in between the first two lines, someone removing the
second line out of ignorance, ...).
-Stephan
class Something: public cppu::WeakImplHelper1<XSomething> { ... };
rtl::Reference<Something> s(new Something);
s->privateNonUnoFunction();
css::uno::Reference<XSomething> x(s.get());
etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
-- Author unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]