Content-Based Networking Simulation Library Documentation (v. 1.2.1)

SetPredicateEvent.h

00001 // -*- C++ -*-
00002 //
00003 //  This file is part of CBNSIM, the Content-Based Networking
00004 //  Simulation Library.
00005 //
00006 //  Authors: See the file AUTHORS for full details.
00007 //
00008 //  Copyright (C) 2002-2004 University of Colorado
00009 //
00010 //  This program is free software; you can redistribute it and/or
00011 //  modify it under the terms of the GNU General Public License
00012 //  as published by the Free Software Foundation; either version 2
00013 //  of the License, or (at your option) any later version.
00014 //
00015 //  This program is distributed in the hope that it will be useful,
00016 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 //  GNU General Public License for more details.
00019 //
00020 //  You should have received a copy of the GNU General Public License
00021 //  along with this program; if not, write to the Free Software
00022 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
00023 //  USA, or send email to serl@cs.colorado.edu.
00024 //
00025 // $Id: SetPredicateEvent.h,v 1.2 2004/02/03 06:16:21 hallcp Exp $
00026 //
00027 #ifndef CBNSIM_SETPREDICATEEVENT_H
00028 #define CBNSIM_SETPREDICATEEVENT_H
00029 
00030 #include "cbnsim/NodeEvent.h"
00031 #include "cbnsim/types.h"
00032 
00033 namespace cbnsim
00034 {
00037   class SetPredicateEvent : public NodeEvent
00038     {
00039     private:
00040         Predicate               m_predicate;
00041         unsigned int            m_msg_rate;
00042     public:
00043       SetPredicateEvent( unsigned int node_id, unsigned int timestep, const Predicate& predicate, unsigned int msg_rate )
00044         : NodeEvent( "set_predicate", node_id, timestep ),
00045         m_predicate( predicate ), m_msg_rate(msg_rate) {}
00046 
00049       const Predicate& predicate() const
00050             { return m_predicate; }
00051 
00052         unsigned int msg_rate() const
00053             { return m_msg_rate; }
00054     };
00055 };
00056 
00057 #endif