Diana  0.8.3
Public Member Functions | Private Attributes
PetriPlace Class Reference

#include <DianaPetriNet.hpp>

Inheritance diagram for PetriPlace:
DianaParameter IDianaPetriPlace ICapeParameter ICapeParameter ICapeIdentification ICapeIdentification

List of all members.

Public Member Functions

 PetriPlace (Common::Types::CapeString _name, CharFunction _charFunc, CharFunction _forkFunc, PetriNet *_net, CapeBoolean _isFork, const PtrData &_ptrInternal)
Common::Types::CapeBoolean GetMark ()
virtual void SetMark (Common::Types::CapeBoolean mark) throw (ECapeUnknown, ECapeInvalidArgument)
void SetValue (const Common::Types::CapeVariant &_value) throw (ECapeUnknown, ECapeInvalidArgument)
Common::Types::CapeString GetName ()
void AddIndex (Common::Types::CapeLong *indexPtr, Common::Types::CapeLong indexValue)
CharFunction GetCharFunc () const
CharFunction GetForkFunc () const
Common::Types::CapeBoolean IsFork () const
void RestoreIndices () const
void addActivateTransition (PetriTransition *_trans)

Private Attributes

PetriNetnet
 place parent net
const CapeBoolean isFork
 whether activating this place should create a fork
CharFunction charFunc
 pointer to a characteristic-value function
CharFunction forkFunc
 pointer to a characteristic-value function executed on fork in daughterCells
std::vector
< Common::Types::CapeLong * > 
indexPtrs
 array of pointers to index variables
std::vector
< Common::Types::CapeLong
indexValues
 array of index variables values
std::vector< PetriTransition * > activateTransitions

Detailed Description

Class that represent Petri place in Petri net.


Constructor & Destructor Documentation

PetriPlace ( Common::Types::CapeString  _name,
CharFunction  _charFunc,
CharFunction  _forkFunc,
PetriNet _net,
CapeBoolean  _isFork,
const PtrData _ptrInternal 
)

Main constructor of class.

Parameters:
nameUser name of place
markReference to a place where mark will be stored
charFunc_Reference to a method of class DianaDAESO which contains calculation of characteristic values or NULL if it's absent. It will be called when place get a mark.
netReference to a parent Petri net

Member Function Documentation

Add an transition, which should be called back with Activate, if this Place is switched from False to True

Returns state of place, true if it has mark or false otherwise

Implements IDianaPetriPlace.

void RestoreIndices ( ) const

Restores indices that were previously added by AddIndex method

virtual void SetMark ( Common::Types::CapeBoolean  mark) throw (ECapeUnknown, ECapeInvalidArgument) [virtual]

Sets state of a mark to a given value

Implements IDianaPetriPlace.

void SetValue ( const Common::Types::CapeVariant _value) throw (ECapeUnknown, ECapeInvalidArgument) [virtual]

Sets the state of a place.

Reimplemented from DianaParameter.


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