User Manual, Developers Guide and API Documentation

ProbeBus.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. 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_PROBE_BUS_PROBEBUS_HPP
00029 #define WNS_PROBE_BUS_PROBEBUS_HPP
00030 
00031 #include <WNS/simulator/Time.hpp>
00032 #include <WNS/probe/bus/Context.hpp>
00033 #include <WNS/PyConfigViewCreator.hpp>
00034 #include <WNS/StaticFactory.hpp>
00035 
00036 namespace wns { namespace probe { namespace bus {
00037 
00038 
00039     namespace detail {
00040         class SubjectPimpl;
00041         class ObserverPimpl;
00042     }
00043 
00095     class ProbeBus
00096     {
00097     public:
00098 
00099         ProbeBus();
00100 
00101         virtual ~ProbeBus();
00102 
00115         virtual bool
00116         accepts(const wns::simulator::Time& time, const IContext& context) = 0;
00117 
00127         virtual void
00128         onMeasurement(const wns::simulator::Time& time,
00129                       const double& measurement,
00130                       const IContext& context) = 0;
00131 
00136         virtual void
00137         output() = 0;
00162         virtual void
00163         forwardMeasurement(const wns::simulator::Time& time,
00164                            const double& measurement,
00165                            const IContext& context);
00166 
00174         virtual void
00175         forwardOutput();
00182 
00188         virtual void
00189         startObserving(ProbeBus* other);
00190 
00196         virtual void
00197         stopObserving(ProbeBus* other);
00198 
00199         virtual bool
00200         hasObservers() const;
00203     private:
00204         detail::SubjectPimpl* subject_;
00205         detail::ObserverPimpl* observer_;
00206     };
00207 
00208     typedef PyConfigViewCreator<ProbeBus> ProbeBusCreator;
00209     typedef StaticFactory<ProbeBusCreator> ProbeBusFactory;
00210 
00211 
00212 } // bus
00213 } // probe
00214 } // wns
00215 
00278 #endif // WNS_PROBE_BUS_PROBEBUS_HPP

Generated on Fri May 25 03:31:50 2012 for openWNS by  doxygen 1.5.5