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

Public Types | Public Member Functions | Protected Member Functions

cbnsim::WorkloadNodeProcessFactory Class Reference

Factory class for WorkloadNodeProcess instances. More...

#include <WorkloadNodeProcessFactory.h>

Inheritance diagram for cbnsim::WorkloadNodeProcessFactory:
cbnsim::NodeFailWNPF cbnsim::SendMessageWNPF cbnsim::SetPredicateWNPF

List of all members.

Public Types

enum  NodeType { Publisher_Node, Subscriber_Node, Any_Node }
 

Enumeration of different node types.


Public Member Functions

virtual bool applies_to (NodeType nt)=0
 Abstract method that allows the factory to determine what kinds of node types its generated WorkloadNodeProcess applies to.
const std::string & event_name () const
 Returns the event name supplied to the constructor.
virtual bool handle_argument (std::vector< std::string >::const_iterator &itr, std::vector< std::string >::const_iterator end)=0 throw ( argument_exception )
 Abstract method to allow the factory to handle a command line argument. The implementation should return true if it handled the argument, false otherwise.
virtual WorkloadNodeProcessnewWorkloadNodeProcess (unsigned int nid, ostream &out, ssbg::SSBG &ssbg, double wtu)=0 throw ()
 Abstract factory method to return a newly allocated WorkloadNodeProcess.
virtual void print_optional_usage (std::ostream &out)=0
 Abstract method to print out usage for optional arguments.
virtual void print_required_usage (std::ostream &out)=0
 Abstract method to print out usage for required arguments.
virtual void print_setting_summary (std::ostream &out)=0
 Abstract method to print out a summary of the factories settings.
virtual bool satisfied () const =0
 Abstract method useds to determine if a factory's required settings have been satisfied.

Protected Member Functions

 WorkloadNodeProcessFactory (const std::string &event_name)
 Derived classes must provide an event name during construction.

Detailed Description

Factory class for WorkloadNodeProcess instances.


Member Function Documentation

virtual WorkloadNodeProcess* cbnsim::WorkloadNodeProcessFactory::newWorkloadNodeProcess ( unsigned int  nid,
ostream &  out,
ssbg::SSBG &  ssbg,
double  wtu 
) throw () [pure virtual]

Abstract factory method to return a newly allocated WorkloadNodeProcess.

The node id of the node to be associated with the new process.

virtual void cbnsim::WorkloadNodeProcessFactory::print_setting_summary ( std::ostream &  out) [pure virtual]

Abstract method to print out a summary of the factories settings.

Lines should begin with a '#' character.

Implemented in cbnsim::NodeFailWNPF, cbnsim::SendMessageWNPF, and cbnsim::SetPredicateWNPF.


The documentation for this class was generated from the following file: