adevs
Public Member Functions | Protected Member Functions | Friends
adevs::Atomic Class Reference

#include <adevs_models.h>

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

List of all members.

Public Member Functions

 Atomic ()
 The constructor should place the model into its initial state.
virtual void delta_int ()=0
 Internal transition function.
virtual void delta_ext (T e, const Bag< X > &xb)=0
virtual void delta_conf (const Bag< X > &xb)=0
virtual void output_func (Bag< X > &yb)=0
virtual T ta ()=0
virtual void gc_output (Bag< X > &g)=0
virtual void beginLookahead ()
virtual void endLookahead ()
virtual ~Atomic ()
 Destructor.
Atomic< X, T > * typeIsAtomic ()
 Returns a pointer to this model.

Protected Member Functions

getLastEventTime () const

Friends

class Simulator< X, T >
class Schedule< X, T >

Detailed Description

Base type for all atomic DEVS models.


Member Function Documentation

virtual void adevs::Atomic::beginLookahead ( ) [inline, virtual]

This method is called by the simulator just before the model is used in a lookahead calculation. When this method is called the model must perform in such a way as to be able to restore itself to its current state when the restore() method is called at the end of the lookahead calculation. If this method is not supported then it must throw a method_not_supported_exception, which is the default.

virtual void adevs::Atomic::delta_conf ( const Bag< X > &  xb) [pure virtual]

Confluent transition function.

Parameters:
xbInput for the model.

Implemented in adevs::Hybrid.

virtual void adevs::Atomic::delta_ext ( e,
const Bag< X > &  xb 
) [pure virtual]

External transition function.

Parameters:
eTime elapsed since the last change of state
xbInput for the model.

Implemented in adevs::Hybrid.

virtual void adevs::Atomic::endLookahead ( ) [inline, virtual]

This method is called when a lookahead calculation is finished. The model must restore its state to that which it was in when beginLookahead was called. The default implementation is to do nothing.

virtual void adevs::Atomic::gc_output ( Bag< X > &  g) [pure virtual]

Garbage collection function. The objects in g are no longer in use by the simulation engine and should be disposed of. ` * Note that the elements in g are only those objects produced as output by this model.

Implemented in adevs::Hybrid.

T adevs::Atomic::getLastEventTime ( ) const [inline, protected]

Get the last event time for this model. This is provided primarily for use with the backwards compatibility module and should not be relied on. It is likely to be removed in later versions of the code.

virtual void adevs::Atomic::output_func ( Bag< X > &  yb) [pure virtual]

Output function. Output values should be added to the bag yb.

Parameters:
ybEmpty bag to be filled with the model's output

Implemented in adevs::Hybrid.

Referenced by adevs::Simulator::computeNextOutput().

virtual T adevs::Atomic::ta ( ) [pure virtual]

Time advance function. adevs_inf<T>() is used for infinity.

Returns:
The time to the next internal event

Implemented in adevs::Hybrid, and adevs::ModelWrapper.


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