/* * BlankSymbol.cpp * * Created on: Mar 26, 2013 * Author: Jan Travnicek */ #include "BlankSymbol.h" #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> namespace alphabet { BlankSymbol::BlankSymbol() { } SymbolBase* BlankSymbol::clone ( ) const & { return new BlankSymbol(*this); } SymbolBase* BlankSymbol::clone() && { return new BlankSymbol(std::move(*this)); } int BlankSymbol::compare(const BlankSymbol&) const { return 0; } void BlankSymbol::operator>>(std::ostream& out) const { out << "(Blank symbol)"; } BlankSymbol::operator std::string () const { return BlankSymbol::instance < std::string > ( ); } SymbolBase* BlankSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } } /* namespace alphabet */ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::BlankSymbol > ( ); } /* namespace */