Skip to content
Snippets Groups Projects
Commit dc8ec294 authored by Martin Žák's avatar Martin Žák
Browse files

Removes Symbol from automaton namespace.

parent e392d0e7
No related branches found
No related tags found
No related merge requests found
/*
* Symbol.cpp
*
* Created on: Mar 26, 2013
* Author: martin
*/
#include "Symbol.h"
namespace automaton {
Symbol::Symbol(const std::string& symbol) {
this->symbol = symbol;
}
const std::string& Symbol::getSymbol() const {
return symbol;
}
bool Symbol::operator < (const Symbol& other) const {
return symbol < other.symbol;
}
bool Symbol::operator == (const Symbol& other) const {
return symbol == other.symbol;
}
bool Symbol::operator != (const Symbol& other) const {
return symbol != other.symbol;
}
void Symbol::toXML(std::ostream& out, const std::string& indent) const {
out << indent << "<symbol>" << symbol << "</symbol>\n";
}
} /* namespace automaton */
/*
* Symbol.h
*
* Created on: Mar 26, 2013
* Author: martin
*/
#ifndef SYMBOL_H_
#define SYMBOL_H_
#include <string>
#include <ostream>
namespace automaton {
class Symbol {
protected:
std::string symbol;
public:
Symbol(const std::string& symbol);
const std::string& getSymbol() const;
bool operator <(const Symbol& other) const;
bool operator ==(const Symbol& other) const;
bool operator !=(const Symbol& other) const;
void toXML(std::ostream& out, const std::string& indent) const;
};
}
#endif /* SYMBOL_H_ */
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