Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

jmitie::CjNodeSelector Class Reference

The base class for all node selectors. More...

#include <CjNodeSelector.hh>

Inheritance diagram for jmitie::CjNodeSelector:
Inheritance graph
[legend]
Collaboration diagram for jmitie::CjNodeSelector:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CjNodeSelector_ctor_va_t ctor_va_t
 the variable argument type for the derived constructor
typedef CjNodeSelector_select_va_t select_arg_t
 the variable argument type for the selectNode member function

Public Member Functions

 CjNodeSelector (const ctor_va_t &va)
 Construct a CjNodeSelector base by copying settings from the CjNodeSelector_ctor_va_t object.
virtual std::string getName () const =0
 Returns the free-form name of this class.
virtual std::string getProperty (const std::string &) const =0
 Returns a property of this class.
virtual bool selectNode (select_arg_t &, unsigned int &node)=0
 performs the node selection

Static Public Member Functions

static std::string getName_static ()
 Returns the free-form name of this class (static version).
static std::string getProperty_static (const std::string &)
 Returns a property of this class (static version).

Protected Attributes

const CjNLTopologym_top
 The topology that this node selector is associated with.
std::string m_parent_name
 The free-form name of the parent.
bool m_src_dest
 if false this node selector will be selecting a source node, otherwise a destination node
bool m_add_remove
 if false then this selector will be adding a link, removing otherwise

Detailed Description

The base class for all node selectors.

Additional simulator functionality in the form of node selectors can be added by extending this class and overriding the selectNode(...) method. All simulation-specific constructor data should be supplied through CjNodeSelector_ctor_va_t (such as the topology object with which this selector is to associate, RNG during construction)
and instance-specific configuration such as node selector parameters to use etc.. should be specified in the free-form string argument of the constructor.


Member Function Documentation

virtual bool jmitie::CjNodeSelector::selectNode ( select_arg_t ,
unsigned int &  node 
) [pure virtual]

performs the node selection

Returns false if a node cound not be found and true otherwise.

Implemented in jmitie::corelib::CjNS_D, jmitie::corelib::CjNS_EP, jmitie::corelib::CjNS_EW, jmitie::corelib::CjNS_node, jmitie::corelib::CjNS_prev, jmitie::corelib::CjNS_R, and jmitie::corelib::CjNS_RPN.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator