summaryrefslogtreecommitdiff
path: root/include/vcl/impdel.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/vcl/impdel.hxx')
-rw-r--r--include/vcl/impdel.hxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/include/vcl/impdel.hxx b/include/vcl/impdel.hxx
index 988d85d624db..54159fcaec09 100644
--- a/include/vcl/impdel.hxx
+++ b/include/vcl/impdel.hxx
@@ -17,65 +17,65 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
- #ifndef INCLUDED_VCL_IMPDEL_HXX
- #define INCLUDED_VCL_IMPDEL_HXX
+#ifndef INCLUDED_VCL_IMPDEL_HXX
+#define INCLUDED_VCL_IMPDEL_HXX
- #include <list>
+#include <list>
- namespace vcl
- {
+namespace vcl
+{
- class DeletionListener;
+class DeletionListener;
- class DeletionNotifier
- {
- std::list< DeletionListener* > m_aListeners;
- protected:
- DeletionNotifier() {}
+class DeletionNotifier
+{
+ std::list< DeletionListener* > m_aListeners;
+ protected:
+ DeletionNotifier() {}
- ~DeletionNotifier()
- { notifyDelete(); }
+ ~DeletionNotifier()
+ { notifyDelete(); }
- inline void notifyDelete();
+ inline void notifyDelete();
- public:
- void addDel( DeletionListener* pListener )
- { m_aListeners.push_back( pListener ); }
+ public:
+ void addDel( DeletionListener* pListener )
+ { m_aListeners.push_back( pListener ); }
- void removeDel( DeletionListener* pListener )
- { m_aListeners.remove( pListener ); }
- };
+ void removeDel( DeletionListener* pListener )
+ { m_aListeners.remove( pListener ); }
+};
- class DeletionListener
- {
- DeletionNotifier* m_pNotifier;
- public:
- DeletionListener( DeletionNotifier* pNotifier )
- : m_pNotifier( pNotifier )
- {
- if( m_pNotifier )
- m_pNotifier->addDel( this );
- }
- ~DeletionListener()
- {
- if( m_pNotifier )
- m_pNotifier->removeDel( this );
- }
- void deleted() { m_pNotifier = NULL; }
- bool isDeleted() const { return (m_pNotifier == NULL); }
- };
+class DeletionListener
+{
+ DeletionNotifier* m_pNotifier;
+ public:
+ DeletionListener( DeletionNotifier* pNotifier )
+ : m_pNotifier( pNotifier )
+ {
+ if( m_pNotifier )
+ m_pNotifier->addDel( this );
+ }
+ ~DeletionListener()
+ {
+ if( m_pNotifier )
+ m_pNotifier->removeDel( this );
+ }
+ void deleted() { m_pNotifier = NULL; }
+ bool isDeleted() const { return (m_pNotifier == NULL); }
+};
- inline void DeletionNotifier::notifyDelete()
- {
- for( std::list< DeletionListener* >::const_iterator it =
- m_aListeners.begin(); it != m_aListeners.end(); ++it )
- (*it)->deleted();
+inline void DeletionNotifier::notifyDelete()
+{
+ for( std::list< DeletionListener* >::const_iterator it =
+ m_aListeners.begin(); it != m_aListeners.end(); ++it )
+ (*it)->deleted();
- m_aListeners.clear();
- }
+ m_aListeners.clear();
+}
- } // namespace vcl
+} // namespace vcl
- #endif // INCLUDED_VCL_IMPDEL_HXX
+#endif // INCLUDED_VCL_IMPDEL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */