User Manual, Developers Guide and API Documentation

SuspendSupport.hpp

Go to the documentation of this file.
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. 5, 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_LDK_SUSPENDSUPPORT_HPP
00029 #define WNS_LDK_SUSPENDSUPPORT_HPP
00030 
00031 #include <WNS/ldk/SuspendableInterface.hpp>
00032 
00033 #include <WNS/pyconfig/View.hpp>
00034 #include <WNS/probe/bus/ContextCollector.hpp>
00035 
00036 namespace wns { namespace ldk {
00037 
00038     namespace fun {
00039         class FUN;
00040     } // fun
00041 
00042     class SuspendedInterface;
00043 
00044     class SuspendSupport :
00045         virtual public SuspendableInterface
00046     {
00047     public:
00048         SuspendSupport(wns::ldk::fun::FUN* _fun, const wns::pyconfig::View& _config);
00049 
00050         SuspendSupport(const SuspendSupport& other);
00051 
00052         virtual
00053         ~SuspendSupport();
00054 
00055         virtual void
00056         doSuspend(SuspendedInterface* _si);
00057 
00058         virtual bool
00059         isSuspending() const;
00060 
00061         virtual void
00062         trySuspend() const;
00063 
00064         virtual bool
00065         onSuspend() const = 0;
00066 
00067     private:
00068         bool suspending;
00069         mutable bool suspended;
00070         SuspendedInterface* si;
00071 
00072         double suspendStartTime;
00073 
00074         bool useProbe;
00075 
00076         wns::probe::bus::ContextCollectorPtr timeBufferEmpty;
00077 
00078         wns::ldk::fun::FUN* fun;
00079         wns::pyconfig::View config;
00080     }; // SuspendSupport
00081 
00082 } // ldk
00083 } // wns
00084 
00085 #endif // WNS_LDK_SUSPENDSUPPORT_HPP
00086 
00087 

Generated on Sat May 26 03:31:44 2012 for openWNS by  doxygen 1.5.5