00001 #if !defined(__EVENTS_HPP)
00002 #define __EVENTS_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined(__COMMON_HPP)
00025 #include <corelinux/Common.hpp>
00026 #endif
00027
00028 #if !defined(__EVENT_HPP)
00029 #include <Event.hpp>
00030 #endif
00031
00032 #if !defined(__MEMENTO_HPP)
00033 #include <Memento.hpp>
00034 #endif
00035
00040 static DwordIdentifier ListChanged(1);
00041 static DwordIdentifier SelectionMade(2);
00042 static DwordIdentifier EditedEntry(3);
00043
00044
00045 DECLARE_CLASS( ListEvent );
00046
00053 class ListEvent : public CORELINUX( Event< DwordIdentifier > )
00054 {
00055 public:
00056
00058
00059 ListEvent
00060 (
00061 DwordIdentifierCref aId,
00062 CORELINUX(MementoPtr) aMemento
00063 )
00064 throw ( CORELINUX( NullPointerException ) )
00065 :
00066 CORELINUX(Event<DwordIdentifier>)( aId ),
00067 theMemento(aMemento)
00068 {
00069 if( theMemento == NULLPTR )
00070 {
00071 throw CORELINUX(NullPointerException)(LOCATION);
00072 }
00073 }
00074
00076
00077 virtual ~ListEvent( void )
00078 {
00079 if( theMemento != NULLPTR )
00080 {
00081 delete theMemento;
00082 theMemento = NULLPTR;
00083 }
00084 else
00085 {
00086 ;
00087 }
00088 }
00089
00090
00091
00092
00093
00095
00096 inline CORELINUX(MementoRef) getMemento( void )
00097 {
00098 return *theMemento;
00099 }
00100 protected:
00101
00102 ListEvent( void )
00103 :
00104 CORELINUX( Event<DwordIdentifier> )(),
00105 theMemento( NULLPTR )
00106 {
00107 ;
00108 }
00109
00110 private:
00111
00112 CORELINUX(MementoPtr) theMemento;
00113 };
00114
00115 #endif
00116
00117
00118
00119
00120
00121
00122
00123
00124