Diana
0.8.3
|
#include <DianaPetriNet.hpp>
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 | |
PetriNet * | net |
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 |
Class that represent Petri place in Petri net.
PetriPlace | ( | Common::Types::CapeString | _name, |
CharFunction | _charFunc, | ||
CharFunction | _forkFunc, | ||
PetriNet * | _net, | ||
CapeBoolean | _isFork, | ||
const PtrData & | _ptrInternal | ||
) |
Main constructor of class.
name | User name of place |
mark | Reference 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. |
net | Reference to a parent Petri net |
void addActivateTransition | ( | PetriTransition * | _trans | ) |
Add an transition, which should be called back with Activate, if this Place is switched from False to True
Common::Types::CapeBoolean GetMark | ( | ) | [virtual] |
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.