LibreOffice Module cli_ure (master) 1
|
This class can be used as a base class for UNO objects. More...
Public Member Functions | |
void | dispose () |
This method is called by the owner of this object to explicitly dispose it. More... | |
void | addEventListener (XEventListener xListener) |
Registers an event listener being notified when this object is disposed. More... | |
void | removeEventListener (XEventListener xListener) |
Revokes an event listener from being notified when this object is disposed. More... | |
Public Member Functions inherited from uno.util.WeakBase | |
XAdapter | queryAdapter () |
The returned XAdapter implementation can be used to keap a weak reference to this object. More... | |
Type[] | getTypes () |
Returns an array of Type objects which represent all implemented UNO interfaces of this object. More... | |
byte[] | getImplementationId () |
override String | ToString () |
Protected Member Functions | |
bool | isDisposed () |
Indicates whether object is already disposed. More... | |
void | checkUnDisposed () |
Checks whether this object is disposed and throws a DisposedException if it is already disposed. More... | |
void | preDisposing () |
Override to perform extra clean-up work. More... | |
void | postDisposing () |
Override to become notified right before the disposing action is performed. More... | |
Private Member Functions | |
delegate void | t_disposing (EventObject evt) |
~WeakComponentBase () | |
Private Attributes | |
t_disposing | m_disposing = null |
bool | m_inDispose = false |
bool | m_disposed = false |
Additional Inherited Members | |
Static Protected Attributes inherited from uno.util.WeakBase | |
static Hashtable | s_types = new Hashtable() |
static Hashtable | s_impl_ids = new Hashtable() |
This class can be used as a base class for UNO objects.
It implements the capability to be kept weakly (unoidl.com.sun.star.uno.XWeak) and it implements unoidl.com.sun.star.lang.XTypeProvider which is necessary for using the object from StarBasic. In addition, it implements the interface unoidl.com.sun.star.lang.XComponent to be disposed explicitly.
Definition at line 33 of file WeakComponentBase.cs.
|
inlineprivate |
Definition at line 65 of file WeakComponentBase.cs.
References uno.util.WeakComponentBase.dispose(), lock(), uno.util.WeakComponentBase.m_disposed, and uno.util.WeakComponentBase.m_inDispose.
|
inline |
Registers an event listener being notified when this object is disposed.
xListener | event listener |
Definition at line 158 of file WeakComponentBase.cs.
References lock(), uno.util.WeakComponentBase.m_disposed, uno.util.WeakComponentBase.m_disposing, uno.util.WeakComponentBase.m_inDispose, and uno.util.WeakComponentBase.t_disposing().
|
inlineprotected |
Checks whether this object is disposed and throws a DisposedException if it is already disposed.
Definition at line 56 of file WeakComponentBase.cs.
References uno.util.WeakComponentBase.isDisposed().
|
inline |
This method is called by the owner of this object to explicitly dispose it.
This implementation of dispose() first notifies this object via preDisposing(), then all registered event listeners and finally this object again calling postDisposing().
Definition at line 98 of file WeakComponentBase.cs.
References lock(), uno.util.WeakComponentBase.m_disposed, uno.util.WeakComponentBase.m_disposing, uno.util.WeakComponentBase.m_inDispose, uno.util.WeakComponentBase.postDisposing(), uno.util.WeakComponentBase.preDisposing(), and uno.util.WeakComponentBase.t_disposing().
Referenced by uno.util.WeakComponentBase.~WeakComponentBase().
|
inlineprotected |
Indicates whether object is already disposed.
Definition at line 45 of file WeakComponentBase.cs.
References lock(), and uno.util.WeakComponentBase.m_disposed.
Referenced by uno.util.WeakComponentBase.checkUnDisposed().
|
inlineprotected |
Override to become notified right before the disposing action is performed.
Definition at line 88 of file WeakComponentBase.cs.
Referenced by uno.util.WeakComponentBase.dispose().
|
inlineprotected |
Override to perform extra clean-up work.
Provided for subclasses. It is called during dispose()
Definition at line 81 of file WeakComponentBase.cs.
Referenced by uno.util.WeakComponentBase.dispose().
|
inline |
Revokes an event listener from being notified when this object is disposed.
xListener | event listener |
Definition at line 175 of file WeakComponentBase.cs.
References lock(), uno.util.WeakComponentBase.m_disposed, uno.util.WeakComponentBase.m_disposing, uno.util.WeakComponentBase.m_inDispose, and uno.util.WeakComponentBase.t_disposing().
|
private |
|
private |
|
private |
Definition at line 36 of file WeakComponentBase.cs.
Referenced by uno.util.WeakComponentBase.addEventListener(), uno.util.WeakComponentBase.dispose(), and uno.util.WeakComponentBase.removeEventListener().
|
private |
Definition at line 37 of file WeakComponentBase.cs.
Referenced by uno.util.WeakComponentBase.addEventListener(), uno.util.WeakComponentBase.dispose(), uno.util.WeakComponentBase.removeEventListener(), and uno.util.WeakComponentBase.~WeakComponentBase().