public: /// helper struct to grant access to selected public methods to the ComponentMethodGuard class struct GuardAccess { friendclass ComponentMethodGuard; private: GuardAccess() { } };
/// retrieves the component's mutex
::osl::Mutex& getMutex( GuardAccess ) { return getMutex(); } /// checks whether the component is already disposed, throws a DisposedException if so. void checkDisposed( GuardAccess ) const; /// checks whether the component is already initialized, throws a NotInitializedException if not. void checkInitialized( GuardAccess ) const;
protected: /// retrieves the component's broadcast helper
::cppu::OBroadcastHelper& getBroadcastHelper() { return m_rBHelper; } /// retrieves the component's mutex
::osl::Mutex& getMutex() { return m_rBHelper.rMutex; } /// determines whether the instance is already disposed bool impl_isDisposed() const { return m_rBHelper.bDisposed; }
/// determines whether the component is already initialized bool
impl_isInitialized_nothrow() const { return m_bInitialized; }
/** returns the context to be used when throwing exceptions
class ComponentMethodGuard
{ public: enumclass MethodType
{ /// allow the method to be called only when being initialized and not being disposed Default, /// allow the method to be called without being initialized
WithoutInit
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.