Skip to content
Snippets Groups Projects
Commit 1f5cc56f authored by Jan Trávníček's avatar Jan Trávníček
Browse files

add Label to Symbol constructor

parent 7d9777e2
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,16 @@ void Symbol::inc ( ) {
this->operator ++ ( );
}
 
Symbol::Symbol ( int number ) : alib::WrapperBase < SymbolBase > ( alphabet::LabeledSymbol { label::Label ( number ) } ) {
Symbol::Symbol ( label::Label label ) : alib::WrapperBase < SymbolBase > ( alphabet::LabeledSymbol { std::move ( label ) } ) {
}
 
Symbol::Symbol ( char character ) : alib::WrapperBase < SymbolBase > ( alphabet::LabeledSymbol { label::Label ( character ) } ) {
Symbol::Symbol ( int number ) : Symbol ( label::Label ( number ) ) {
}
 
Symbol::Symbol ( std::string string ) : alib::WrapperBase < SymbolBase > ( alphabet::LabeledSymbol { label::Label ( std::move ( string ) ) } ) {
Symbol::Symbol ( char character ) : Symbol ( label::Label ( character ) ) {
}
Symbol::Symbol ( std::string string ) : Symbol ( label::Label ( std::move ( string ) ) ) {
}
 
Symbol::Symbol ( const char * string ) : Symbol ( ( std::string ) string ) {
......
......@@ -14,6 +14,8 @@
#include <set>
#include <string>
 
#include <label/Label.h>
namespace alphabet {
 
/**
......@@ -23,6 +25,7 @@ class Symbol : public alib::WrapperBase < SymbolBase > {
using alib::WrapperBase < SymbolBase >::WrapperBase;
 
public:
explicit Symbol ( label::Label label );
explicit Symbol ( int number );
explicit Symbol ( char character );
explicit Symbol ( std::string string );
......
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