Skip to content
Snippets Groups Projects
Commit 13f2cb48 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

Possible fix for #94

parent 18eafd9f
No related branches found
No related tags found
1 merge request!31WIP: Resolve "Compose callback for alphabet::InitialSymbol tag not registered."
Pipeline #
/*
* InitialSymbol.cpp
*
* Created on: Nov 21, 2017
* Author: Tomas Pecka
*/
#include "InitialSymbol.h"
#include <alphabet/InitialSymbol.h>
#include <alphabet/Symbol.h>
#include <object/Object.h>
#include <registration/StringRegistration.hpp>
namespace alib {
alphabet::InitialSymbol stringApi < alphabet::InitialSymbol >::parse ( std::istream & ) {
throw exception::CommonException ( "parsing InitialSymbol from string not implemented" );
}
bool stringApi < alphabet::InitialSymbol >::first ( std::istream & ) {
return false;
}
void stringApi < alphabet::InitialSymbol >::compose ( std::ostream & output, const alphabet::InitialSymbol & ) {
output << "#I";
}
} /* namespace alib */
namespace {
static auto stringWrite = registration::StringWriterRegister < alphabet::Symbol, alphabet::InitialSymbol > ( );
static auto stringWrite2 = registration::StringWriterRegister < alib::Object, alphabet::InitialSymbol > ( );
} /* namespace */
/*
* InitialSymbol.h
*
* Created on: Nov 21, 2017
* Author: Tomas Pecka
*/
#ifndef _STRING_INITIAL_SYMBOL_H_
#define _STRING_INITIAL_SYMBOL_H_
#include <alphabet/InitialSymbol.h>
#include <core/stringApi.hpp>
namespace alib {
template < >
struct stringApi < alphabet::InitialSymbol > {
static alphabet::InitialSymbol parse ( std::istream & input );
static bool first ( std::istream & input );
static void compose ( std::ostream & output, const alphabet::InitialSymbol & symbol );
};
} /* namespace alib */
#endif /* _STRING_INITIAL_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