10#define TEAM2026_NODE_H
11#if !GRAFCET_DYNAMIC_FAMILY
12#ifndef GRAFCET_FAMILY_SIZE
13#define GRAFCET_FAMILY_SIZE 10
17#if GRAFCET_DYNAMIC_FAMILY
43 virtual ~Node() =
default;
54#if GRAFCET_DYNAMIC_FAMILY
56 child->
parent.push_back(
this);
58 if (
const auto childrenSize =
children.size(); childrenSize >=
children.max_size()) {
59 throw std::out_of_range(
"Node::addChild");
61 if (
const auto parentSize =
parent.size(); parentSize >=
parent.max_size()) {
62 throw std::out_of_range(
"Node::addChild");
75 std::string name =
"Node";
83#if GRAFCET_DYNAMIC_FAMILY
90 std::array<Node*, GRAFCET_FAMILY_SIZE>
parent = {};
92 std::array<Node*, GRAFCET_FAMILY_SIZE>
children = {};
virtual bool enabled()=0
vérifie si le noeud est activé
std::array< Node *, GRAFCET_FAMILY_SIZE > parent
Liste des nœuds parents.
Definition Node.h:90
auto getChildren() const
retourne la liste des enfants
Definition Node.h:73
bool isTransition
true si le noeud est une transition, false sinon
Definition Node.h:77
virtual void action()=0
action à réaliser lorsque le noeud est actif
constexpr void addChild(Node *child)
attache un enfant au noeud
Definition Node.h:53
bool synchronize
true si le noeud est synchronisant
Definition Node.h:79
std::array< Node *, GRAFCET_FAMILY_SIZE > children
Liste des nœuds enfants.
Definition Node.h:92
Node(const auto &parents, const auto &children={})
Definition Node.h:42
bool active
true si le noeud est actif
Definition Node.h:81
La machine à état permettant de parcourir le grafcet.
Definition StateMachine.h:25
Contient les classes et fonctions nécessaires pour générer et parcourir le Grafcet.
Definition ActionNode.h:16