Hi Felix,

The classes based on SotObject have locking count in addition to the usual refcount. Increasing/decreasing of the lock count automatically increases/decreases refcount. When the lock count reaches zero the DoClose() method is called.

This design is helpful in case of objects that might have multiple owners, but only part of the owners control the lifetime of the object.

SV_DECL_LOCK macro allows to create a helpclass that automatically increases the lock count on the object on creation and decreases it on destruction.

Best Regards,
Mikhail.


Zhang Xiaofei wrote:
Hi Michel,

Thanks very much for offering me a helping hand again :-) . Now I understand how the class is declared. And I think I should start using doxygen right now. Thanks!

And I'm still expecting some explanations on the usage of classes defined with the

SV_DECL_LOCK marco, thanks in advance.

Best Regards,
Felix.


Michel Loiseleur 写道:
Le Thursday 27 September 2007 10:27:53 Zhang Xiaofei, vous avez écrit :
Hi dear all,

A colleague of mine is doing some work recently where he encountered the
SfxObjectShellLock in the sfx2 project, however, though this class can
be found declared and used in several
places(http://lxr.go-oo.org/search?string=SfxObjectShellLock), the
definition cannot be found anywhere. Searching the string as an
identifier via http://lxr.go-oo.org/ does not return any results
either(http://lxr.go-oo.org/ident?i=SfxObjectShellLock).

Could somebody please help to explain where is this class defined, and
what is the purpose and usage of this class? Thanks very much in advance.

That's why you need doxygen ;). It's made with a macro : SV_DECL_LOCK.
You can find it here : http://lxr.go-oo.org/source/framework/sfx2/inc/sfx2/objsh.hxx#832


   Though, I don't the purpose and/or usage of this class.

Regards,



------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to