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

automaton and automata added

parent c75a8be4
No related branches found
No related tags found
No related merge requests found
#include "automata.hpp"
Automata::Automata(vector<Automaton*> agents) : agents_(agents){}
Automata::~Automata(){}
/* Gets */
vector<Automaton*> Automata::get_agents(){
return this->agents_;
}
/* Sets */
void Automata::set_agents(vector<Automaton*> agents){
this->agents_ = agents;
}
\ No newline at end of file
#ifndef AUTOMATA_HPP
#define AUTOMATA_HPP
#include "automaton.hpp"
class Automata
{
private:
vector<Automaton*> agents_;
public:
Automata(vector<Automaton*> agents = {}) { }
~Automata() { }
/* Gets */
vector<Automaton*> get_agents();
/* Sets */
void set_agents(vector<Automaton*> agents);
};
#endif
\ No newline at end of file
#include "automaton.hpp"
Automaton::Automaton(State* initial_state): initial_state_(initial_state){
++current_id;
id = current_id;
}
Automaton::~Automaton(){}
/* Gets */
State* Automaton::get_initial_state(){
return this->initial_state_;
}
/* Sets */
void Automaton::set_initial_state(State* initial_state){
this->initial_state_ = initial_state;
}
int Automaton::current_id = 0;
\ No newline at end of file
#ifndef AUTOMATON_HPP
#define AUTOMATON_HPP
#include "transition.hpp"
class Automaton
{
private:
int id;
static int current_id;
State* initial_state_;
public:
Automaton(State* initial_state = nullptr) { }
~Automaton() { }
/* Gets */
int get_id();
State* get_initial_state();
/* Sets */
void set_initial_state(State* initial_state);
};
#endif
\ No newline at end of file
......@@ -36,11 +36,6 @@ Action* Transition::get_action(){
/* Sets */
/*void Transition::set_id(){
++current_id;
id = current_id;
}*/
void Transition::set_goal(string goal){
goal_ = goal;
}
......
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