Loading...
Searching...
No Matches
ProcessStateDataInterface.hpp
1#pragma once
2#include <State/Address.hpp>
3#include <State/Message.hpp>
4
5#include <Process/State/MessageNode.hpp>
6
7#include <score/model/IdentifiedObject.hpp>
8#include <score/model/Identifier.hpp>
9#include <score/tools/std/Optional.hpp>
10
11#include <score_lib_process_export.h>
12
13#include <vector>
14#include <verdigris>
15
16namespace Process
17{
18class ProcessModel;
19}
20class QObject;
21
22class SCORE_LIB_PROCESS_EXPORT ProcessStateDataInterface
23 : public IdentifiedObject<ProcessStateDataInterface>
24{
26public:
27 ProcessStateDataInterface(Process::ProcessModel& model, QObject* parent);
28
30
37 virtual std::vector<State::AddressAccessor> matchingAddresses() { return {}; }
38
44 virtual std::vector<State::AddressAccessor> takenOverAddresses() const { return {}; }
45
49 virtual State::MessageList messages() const { return {}; }
50
57 virtual State::MessageList setMessages(
58 const State::MessageList& newMessages, const Process::MessageNode& currentState)
59 {
60 return messages();
61 }
62
63 Process::ProcessModel& process() const { return m_model; }
64
65public:
66 void stateChanged() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, stateChanged)
72 void messagesChanged() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, messagesChanged)
73
74private:
75 Process::ProcessModel& m_model;
76};
The IdentifiedObject class.
Definition IdentifiedObject.hpp:19
The Process class.
Definition score-lib-process/Process/Process.hpp:80
Definition ProcessStateDataInterface.hpp:24
virtual State::MessageList messages() const
messages The current messages in this point of the process.
Definition ProcessStateDataInterface.hpp:49
virtual std::vector< State::AddressAccessor > matchingAddresses()
matchingAddresses The addresses that correspond to this state.
Definition ProcessStateDataInterface.hpp:37
virtual State::MessageList setMessages(const State::MessageList &newMessages, const Process::MessageNode &currentState)
setMessages Request a message change on behalf of the process.
Definition ProcessStateDataInterface.hpp:57
virtual std::vector< State::AddressAccessor > takenOverAddresses() const
takenOverAddresses The addresses the process starts from the value they have (e.g....
Definition ProcessStateDataInterface.hpp:44
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115