LibreOffice Module comphelper (master) 1
|
#include <componentbase.hxx>
Classes | |
struct | GuardAccess |
helper struct to grant access to selected public methods to the ComponentMethodGuard class More... | |
struct | NoInitializationNeeded |
Public Member Functions | |
::osl::Mutex & | getMutex (GuardAccess) |
retrieves the component's mutex More... | |
void | checkDisposed (GuardAccess) const |
checks whether the component is already disposed, throws a DisposedException if so. More... | |
void | checkInitialized (GuardAccess) const |
checks whether the component is already initialized, throws a NotInitializedException if not. More... | |
Protected Member Functions | |
ComponentBase (::cppu::OBroadcastHelper &_rBHelper) | |
creates a ComponentBase instance More... | |
ComponentBase (::cppu::OBroadcastHelper &_rBHelper, NoInitializationNeeded) | |
creates a ComponentBase instance More... | |
~ComponentBase () COVERITY_NOEXCEPT_FALSE | |
void | setInitialized () |
marks the instance as initialized More... | |
::cppu::OBroadcastHelper & | getBroadcastHelper () |
retrieves the component's broadcast helper More... | |
::osl::Mutex & | getMutex () |
retrieves the component's mutex More... | |
bool | impl_isDisposed () const |
determines whether the instance is already disposed More... | |
bool | impl_isInitialized_nothrow () const |
determines whether the component is already initialized More... | |
Static Protected Member Functions | |
static css::uno::Reference< css::uno::XInterface > | getComponent () |
returns the context to be used when throwing exceptions More... | |
Private Attributes | |
::cppu::OBroadcastHelper & | m_rBHelper |
bool | m_bInitialized |
Definition at line 33 of file componentbase.hxx.
|
inlineprotected |
creates a ComponentBase instance
The instance is not initialized. As a consequence, every ComponentMethodGuard instantiated for this component will throw a css::lang::NotInitializedException, until ->setInitialized() is called.
Definition at line 42 of file componentbase.hxx.
|
inlineprotected |
creates a ComponentBase instance
The instance is already initialized, so there's no need to call setInitialized later on. Use this constructor for component implementations which do not require explicit initialization.
Definition at line 55 of file componentbase.hxx.
|
inlineprotected |
Definition at line 61 of file componentbase.hxx.
void comphelper::ComponentBase::checkDisposed | ( | GuardAccess | ) | const |
checks whether the component is already disposed, throws a DisposedException if so.
Definition at line 36 of file componentbase.cxx.
References cppu::OBroadcastHelperVar< class container, class keyType >::bDisposed, getComponent(), and m_rBHelper.
Referenced by comphelper::ComponentMethodGuard::ComponentMethodGuard().
void comphelper::ComponentBase::checkInitialized | ( | GuardAccess | ) | const |
checks whether the component is already initialized, throws a NotInitializedException if not.
Definition at line 43 of file componentbase.cxx.
References getComponent(), and m_bInitialized.
Referenced by comphelper::ComponentMethodGuard::ComponentMethodGuard().
|
inlineprotected |
retrieves the component's broadcast helper
Definition at line 82 of file componentbase.hxx.
|
staticprotected |
returns the context to be used when throwing exceptions
The default implementation returns <NULL>.
Definition at line 50 of file componentbase.cxx.
Referenced by checkDisposed(), and checkInitialized().
|
inlineprotected |
retrieves the component's mutex
Definition at line 84 of file componentbase.hxx.
|
inline |
retrieves the component's mutex
Definition at line 74 of file componentbase.hxx.
References getMutex().
Referenced by getMutex().
|
inlineprotected |
determines whether the instance is already disposed
Definition at line 86 of file componentbase.hxx.
|
inlineprotected |
determines whether the component is already initialized
Definition at line 90 of file componentbase.hxx.
|
inlineprotected |
marks the instance as initialized
Subsequent instantiations of a ComponentMethodGuard won't throw the NotInitializedException now.
Definition at line 67 of file componentbase.hxx.
|
private |
Definition at line 101 of file componentbase.hxx.
Referenced by checkInitialized().
|
private |
Definition at line 100 of file componentbase.hxx.
Referenced by checkDisposed().