Content-Based Networking Simulation Library Documentation (v. 1.2.1) |
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: WorkloadNodeProcessFactory.h,v 1.2 2004/01/28 02:18:58 hallcp Exp $ 00026 // 00027 #ifndef CBNSIM_WORKLOADNODEPROCESSFACTORY_H 00028 #define CBNSIM_WORKLOADNODEPROCESSFACTORY_H 00029 00030 #include <siena/ssbg.h> 00031 #include <vector> 00032 #include "cbnsim/WorkloadNodeProcess.h" 00033 #include "cbnsim/argument_exception.h" 00034 00035 namespace cbnsim 00036 { 00039 class WorkloadNodeProcessFactory 00040 { 00041 private: 00042 std::string m_event_name; 00043 00044 protected: 00048 WorkloadNodeProcessFactory( const std::string& event_name ) 00049 : m_event_name( event_name ) {} 00050 00051 public: 00054 enum NodeType { Publisher_Node, Subscriber_Node, Any_Node }; 00055 00056 virtual ~WorkloadNodeProcessFactory() {} 00057 00062 virtual bool applies_to( NodeType nt ) = 0; 00063 00066 const std::string& event_name() const 00067 { return m_event_name; } 00068 00073 virtual bool handle_argument( std::vector<std::string>::const_iterator& itr, 00074 std::vector<std::string>::const_iterator end ) throw ( argument_exception ) = 0; 00075 00082 virtual WorkloadNodeProcess* newWorkloadNodeProcess( unsigned int nid, ostream& out, ssbg::SSBG& ssbg, double wtu ) throw () = 0; 00083 00086 virtual void print_optional_usage( std::ostream& out ) = 0; 00087 00090 virtual void print_required_usage( std::ostream& out ) = 0; 00091 00096 virtual void print_setting_summary( std::ostream& out ) = 0; 00097 00101 virtual bool satisfied() const = 0; 00102 }; 00103 }; 00104 00105 #endif
Copyright © 2001-2004 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Matthew J. Rutherford |