rc_event_queue_accessor.h

Go to the documentation of this file.
00001 // vim:set et sts=4 ts=4 tw=75 sw=4 ai ci cin cino=g0,t0:
00002 /*
00003  * Copyright (C) 2007, Technical Computer Science Group,
00004  *                     University of Bonn
00005  *
00006  * This file is part of the ReChannel library.
00007  *
00008  * The ReChannel library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU 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  * This library is distributed in the hope that it will be
00014  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this library; see the file COPYING. If not, write to the
00020  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
00021  * Boston, MA 02110-1301, USA.
00022  *
00023  * Authors: Andreas Raabe and Armin Felke. Implementation by Armin Felke.
00024  *          {raabe, felke}@cs.uni-bonn.de
00025  */
00039 #ifndef RC_EVENT_QUEUE_ACCESSOR_H_
00040 #define RC_EVENT_QUEUE_ACCESSOR_H_
00041 
00042 #include "ReChannel/communication/accessors/rc_accessor.h"
00043 
00044 namespace ReChannel {
00045 
00049 RC_FALLBACK_INTERFACE(sc_event_queue_if)
00050 {
00051 public:
00052     virtual void notify(double t, sc_time_unit tu)
00053         { }
00054     virtual void notify(const sc_time& t)
00055         { }
00056     virtual void cancel_all()
00057         { }
00058     virtual const sc_event& default_event() const
00059     {
00060         SC_REPORT_WARNING(RC_ID_UNDEFINED_EVENT_WARNING_, 0);
00061         return p_undef;
00062     }
00063 private:
00064     sc_event p_undef;
00065 };
00066 
00070 RC_ACCESSOR(sc_event_queue_if)
00071 {
00072     RC_ACCESSOR_CTOR(sc_event_queue_if) { }
00073 
00074     RC_EVENT(default_event);
00075 
00076     virtual void notify(double t, sc_time_unit tu)
00077     {
00078         this->rc_nb_forward(&if_type::notify, t, tu);
00079     }
00080     virtual void notify(const sc_time& t)
00081     {
00082         this->rc_nb_forward(&if_type::notify, t);
00083     }
00084     virtual void cancel_all()
00085     {
00086         this->rc_nb_forward(&if_type::cancel_all);
00087     }
00088 };
00089 
00090 } // namespace ReChannel
00091 
00092 #endif // RC_EVENT_QUEUE_ACCESSOR_H_
00093 //
00094 // $Id: rc_event_queue_accessor.h,v 1.7 2007/11/23 13:21:48 felke Exp $
00095 // $Source: /var/cvs/projekte/ReChannel-v2/src/ReChannel/communication/accessors/rc_event_queue_accessor.h,v $
00096 //
00097 

Generated on Tue Jan 1 23:13:32 2008 for ReChannel by  doxygen 1.5.3