Skip to content
Snippets Groups Projects
Commit 758707a9 authored by Giann Karlo Aguirre Samboní's avatar Giann Karlo Aguirre Samboní
Browse files

main classes of amas implementation were documented

parent 2ee75d48
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
#include <vector> #include <vector>
using namespace std; using namespace std;
//! Action entity, associated to a transition to represent either a Synchronization or a Label implementations.
/*!
Action refers to the event after a guard is satisfied and before an update take place. It is strongly associated with a transition and makes sense because is an interface for the Label and Synchronization classes.
*/
class Action class Action
{ {
public: public:
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
#include "automaton.hpp" #include "automaton.hpp"
#include "channel.hpp" #include "channel.hpp"
//! Automata entity, a bunch of automaton and channels to synchronize them.
/*!
Basically, it is a class to model and control a system which has several agents (Automaton) and channels. The former communicate and synchronize through the latter.
*/
class Automata class Automata
{ {
private: private:
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#include "transition.hpp" #include "transition.hpp"
#include "state.hpp" #include "state.hpp"
//! Automaton entity, compose by states and transitions to connect them.
/*!
A class to model an agent which is an abstract machine with states and transitions among them. Each agent (Automaton) has an unique id number.
*/
class Automaton class Automaton
{ {
private: private:
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
using namespace std; using namespace std;
//! Channel entity, part of Automata used to synchronize Automaton.
/*!
This class is used to allow a way where several agents can synchronize (Send or Receive) regard to name Channel. It has an unique id number.
*/
class Channel class Channel
{ {
private: private:
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#include "action.hpp" #include "action.hpp"
//! Label entity, an Action which does not synchronize.
/*!
It is an implementation for Action interface and set a name for an action which does not synchronize.
*/
class Label: public Action class Label: public Action
{ {
private: private:
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
using namespace std; using namespace std;
class Transition; class Transition;
//! State entity.
/*!
It is part of Automaton used to denote their states with transtions as abstract machine. It has an unique id number.
*/
class State class State
{ {
private: private:
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
using namespace std; using namespace std;
//! StateType enum class.
/*!
by definition there are three types of States: initial, normal and accepted.
*/
enum class StateType enum class StateType
{ {
Normal, // 0 Normal, // 0
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#include "synchronization_type.hpp" #include "synchronization_type.hpp"
#include "channel.hpp" #include "channel.hpp"
//! Synchronization entity, an action used to synchronize automaton.
/*!
It is an implementation for Action interface and set a type to synchronize automaton through a channel.
*/
class Synchronization: public Action class Synchronization: public Action
{ {
private: private:
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
using namespace std; using namespace std;
//! SynchronizationType enum class.
/*!
Eventually, automaton does synchronization which must be a match: Send or Receive.
*/
enum class SynchronizationType enum class SynchronizationType
{ {
Send, // 0 Send, // 0
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
using namespace std; using namespace std;
class State; class State;
//! Transition entity.
/*!
It links states in an automaton and serves in the synchronization process of automaton. It has an unique id number.
*/
class Transition class Transition
{ {
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment