adevs
Public Member Functions | List of all members
adevs::Network< X, T > Class Template Referenceabstract

#include <adevs_models.h>

Inheritance diagram for adevs::Network< X, T >:
adevs::Devs< X, T >

Public Member Functions

 Network ()
 Constructor.
 
virtual void getComponents (Set< Devs< X, T > * > &c)=0
 
virtual void route (const X &value, Devs< X, T > *model, Bag< Event< X, T > > &r)=0
 
virtual ~Network ()
 
Network< X, T > * typeIsNetwork ()
 Returns a pointer to this model.
 
- Public Member Functions inherited from adevs::Devs< X, T >
 Devs ()
 Default constructor.
 
virtual ~Devs ()
 Destructor.
 
virtual Atomic< X, T > * typeIsAtomic ()
 Returns NULL if this is not an atomic model; returns itself otherwise.
 
const Network< X, T > * getParent () const
 
Network< X, T > * getParent ()
 
void setParent (Network< X, T > *parent)
 
virtual bool model_transition ()
 
virtual T lookahead ()
 
void setProc (int proc)
 
int getProc ()
 

Detailed Description

template<class X, class T>
class adevs::Network< X, T >

Base class for DEVS network models.

Constructor & Destructor Documentation

template<class X, class T>
virtual adevs::Network< X, T >::~Network ( )
inlinevirtual

Destructor. This destructor does not delete any component models. Any necessary cleanup should be done by the derived class.

Member Function Documentation

template<class X, class T>
virtual void adevs::Network< X, T >::getComponents ( Set< Devs< X, T > * > &  c)
pure virtual

This method should fill the set c with all the Network's components, excluding the Network model itself.

Parameters
cAn empty set to the filled with the Network's components.

Implemented in adevs::SimpleDigraph< VALUE, T >.

template<class X, class T>
virtual void adevs::Network< X, T >::route ( const X &  value,
Devs< X, T > *  model,
Bag< Event< X, T > > &  r 
)
pure virtual

This method is called by the Simulator to route an output value produced by a model. This method should fill the bag r with Events that point to the target model and carry the value to be delivered to the target. The target may be a component of the Network or the Network itself, the latter causing the Network to produce an output.

Parameters
modelThe model that produced the output value
valueThe output value produced by the model
rA bag to be filled with (target,value) pairs

Implemented in adevs::SimpleDigraph< VALUE, T >.


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