Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

ListEvents.hpp

00001 #if !defined(__LISTEVENTS_HPP) 00002 #define __LISTEVENTS_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 2000 CoreLinux Consortium 00007 00008 The CoreLinux++ Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. 00012 00013 The CoreLinux++ Library Library is distributed in the hope that it will 00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with the GNU C Library; see the file COPYING.LIB. If not, 00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 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 ; // do nothing 00087 } 00088 } 00089 00090 // 00091 // Accessors 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 ; // do nothing 00108 } 00109 00110 private: 00111 00112 CORELINUX(MementoPtr) theMemento; 00113 }; 00114 00115 #endif // if !defined(__LISTEVENTS_HPP) 00116 00117 /* 00118 Common rcs information do not modify 00119 $Author: frankc $ 00120 $Revision: 1.1 $ 00121 $Date: 2000/05/07 03:46:00 $ 00122 $Locker: $ 00123 */ 00124

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium