![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2007 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 16, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #ifndef WNS_EVENTS_SCHEDULER_INOTIFICATION_HPP 00029 #define WNS_EVENTS_SCHEDULER_INOTIFICATION_HPP 00030 00031 #include <WNS/ObserverInterface.hpp> 00032 #include <WNS/simulator/Time.hpp> 00033 00034 namespace wns { namespace events { namespace scheduler { 00035 00041 class INotification 00042 { 00043 public: 00044 virtual 00045 ~INotification(); 00046 00047 void 00048 onProcessOneEvent(); 00049 00050 void 00051 onCancelEvent(); 00052 00053 void 00054 onSchedule(); 00055 00056 void 00057 onScheduleDelay(); 00058 00059 void 00060 onScheduleNow(); 00061 00062 void 00063 onAddEvent(); 00064 00065 private: 00069 virtual void 00070 doOnProcessOneEvent() = 0; 00071 00076 virtual void 00077 doOnCancelEvent() = 0; 00078 00083 virtual void 00084 doOnSchedule() = 0; 00085 00090 virtual void 00091 doOnScheduleDelay() = 0; 00096 virtual void 00097 doOnScheduleNow() = 0; 00098 00103 virtual void 00104 doOnAddEvent() = 0; 00105 00106 }; 00107 00108 typedef ObserverInterface<INotification> IObserver; 00109 00118 class IgnoreAllNotifications : 00119 virtual public INotification 00120 { 00121 virtual void 00122 doOnProcessOneEvent() 00123 { 00124 } 00125 00126 virtual void 00127 doOnCancelEvent() 00128 { 00129 } 00130 00131 virtual void 00132 doOnSchedule() 00133 { 00134 } 00135 00136 virtual void 00137 doOnScheduleDelay() 00138 { 00139 } 00140 00141 virtual void 00142 doOnScheduleNow() 00143 { 00144 } 00145 00146 virtual void 00147 doOnAddEvent() 00148 { 00149 } 00150 }; 00151 00152 } // scheduler 00153 } // events 00154 } // wns 00155 00156 #endif // NOT defined WNS_EVENTS_SCHEDULER_INOTIFICATION_HPP
1.5.5