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

inherit constructors in wrappers

parent 349a47ad
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <sax/SaxParseInterface.h> #include <sax/SaxParseInterface.h>
#include <sax/ParserException.h> #include <sax/ParserException.h>
#include <object/Object.h> #include <object/Object.h>
#include <string/LinearString.h>
   
#include "cast/AutomatonCastVisitor.h" #include "cast/AutomatonCastVisitor.h"
#include "cast/GrammarCastVisitor.h" #include "cast/GrammarCastVisitor.h"
......
...@@ -20,16 +20,7 @@ namespace alphabet { ...@@ -20,16 +20,7 @@ namespace alphabet {
* Wrapper around automata. * Wrapper around automata.
*/ */
class Symbol : public alib::wrapper<SymbolBase> { class Symbol : public alib::wrapper<SymbolBase> {
public: using alib::wrapper<SymbolBase>::wrapper;
explicit Symbol(SymbolBase* data) : alib::wrapper<SymbolBase>(data) {
}
explicit Symbol(const SymbolBase& data) : alib::wrapper<SymbolBase>(data.clone()) {
}
explicit Symbol(SymbolBase&& data) : alib::wrapper<SymbolBase>(std::move(data).plunder()) {
}
}; };
   
/** /**
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
   
#include "Automaton.h" #include "Automaton.h"
#include "common/State.h"
#include "../label/NextLabel.h" #include "../label/NextLabel.h"
#include <climits> #include <climits>
#include "AutomatonException.h" #include "AutomatonException.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "AutomatonBase.h" #include "AutomatonBase.h"
#include "../common/wrapper.hpp" #include "../common/wrapper.hpp"
   
#include "common/State.h" #include "AutomatonFeatures.h"
#include <set> #include <set>
   
namespace automaton { namespace automaton {
...@@ -20,16 +20,7 @@ namespace automaton { ...@@ -20,16 +20,7 @@ namespace automaton {
* Wrapper around automata. * Wrapper around automata.
*/ */
class Automaton : public alib::wrapper<AutomatonBase> { class Automaton : public alib::wrapper<AutomatonBase> {
public: using alib::wrapper<AutomatonBase>::wrapper;
explicit Automaton(AutomatonBase* data) : alib::wrapper<AutomatonBase>(data) {
}
explicit Automaton(const AutomatonBase& data) : alib::wrapper<AutomatonBase>(data.clone()) {
}
explicit Automaton(AutomatonBase&& data) : alib::wrapper<AutomatonBase>(std::move(data).plunder()) {
}
}; };
   
State createUniqueState(State base, const std::set<State>& other); State createUniqueState(State base, const std::set<State>& other);
......
...@@ -17,16 +17,7 @@ namespace container { ...@@ -17,16 +17,7 @@ namespace container {
* Wrapper around containers. * Wrapper around containers.
*/ */
class Container : public alib::wrapper<ContainerBase> { class Container : public alib::wrapper<ContainerBase> {
public: using alib::wrapper<ContainerBase>::wrapper;
explicit Container(ContainerBase* data) : alib::wrapper<ContainerBase>(data) {
}
explicit Container(const ContainerBase& data) : alib::wrapper<ContainerBase>(data.clone()) {
}
explicit Container(ContainerBase&& data) : alib::wrapper<ContainerBase>(std::move(data).plunder()) {
}
}; };
   
} /* namespace container */ } /* namespace container */
......
...@@ -17,16 +17,7 @@ namespace grammar { ...@@ -17,16 +17,7 @@ namespace grammar {
* Wrapper around grammars. * Wrapper around grammars.
*/ */
class Grammar : public alib::wrapper<GrammarBase> { class Grammar : public alib::wrapper<GrammarBase> {
public: using alib::wrapper<GrammarBase>::wrapper;
explicit Grammar(GrammarBase* data) : alib::wrapper<GrammarBase>(data) {
}
explicit Grammar(const GrammarBase& data) : alib::wrapper<GrammarBase>(data.clone()) {
}
explicit Grammar(GrammarBase&& data) : alib::wrapper<GrammarBase>(std::move(data).plunder()) {
}
}; };
   
} /* namespace grammar */ } /* namespace grammar */
......
...@@ -15,16 +15,7 @@ namespace graph { ...@@ -15,16 +15,7 @@ namespace graph {
   
// Wrapper around graphs. // Wrapper around graphs.
class Graph : public alib::wrapper<GraphBase> { class Graph : public alib::wrapper<GraphBase> {
public: using alib::wrapper<GraphBase>::wrapper;
explicit Graph(GraphBase* data) : alib::wrapper<GraphBase>(data) {
}
explicit Graph(const GraphBase& data) : alib::wrapper<GraphBase>(data.clone()) {
}
explicit Graph(GraphBase&& data) : alib::wrapper<GraphBase>(std::move(data).plunder()) {
}
}; };
   
} // namespace graph } // namespace graph
......
...@@ -17,16 +17,7 @@ namespace label { ...@@ -17,16 +17,7 @@ namespace label {
* Wrapper around automata. * Wrapper around automata.
*/ */
class Label : public alib::wrapper<LabelBase> { class Label : public alib::wrapper<LabelBase> {
public: using alib::wrapper<LabelBase>::wrapper;
explicit Label(LabelBase* data) : alib::wrapper<LabelBase>(data) {
}
explicit Label(const LabelBase& data) : alib::wrapper<LabelBase>(data.clone()) {
}
explicit Label(LabelBase&& data) : alib::wrapper<LabelBase>(std::move(data).plunder()) {
}
}; };
   
label::Label labelFrom(int number); label::Label labelFrom(int number);
......
...@@ -17,16 +17,7 @@ namespace alib { ...@@ -17,16 +17,7 @@ namespace alib {
* Wrapper around object. * Wrapper around object.
*/ */
class Object : public alib::wrapper<ObjectBase> { class Object : public alib::wrapper<ObjectBase> {
public: using alib::wrapper<ObjectBase>::wrapper;
explicit Object(ObjectBase* data) : alib::wrapper<ObjectBase>(data) {
}
explicit Object(const ObjectBase& data) : alib::wrapper<ObjectBase>(data.clone()) {
}
explicit Object(ObjectBase&& data) : alib::wrapper<ObjectBase>(std::move(data).plunder()) {
}
}; };
   
} /* namespace alib */ } /* namespace alib */
......
...@@ -17,16 +17,7 @@ namespace primitive { ...@@ -17,16 +17,7 @@ namespace primitive {
* Wrapper around primitive data types. * Wrapper around primitive data types.
*/ */
class Primitive : public alib::wrapper<PrimitiveBase> { class Primitive : public alib::wrapper<PrimitiveBase> {
public: using alib::wrapper<PrimitiveBase>::wrapper;
explicit Primitive(PrimitiveBase* data) : alib::wrapper<PrimitiveBase>(data) {
}
explicit Primitive(const PrimitiveBase& data) : alib::wrapper<PrimitiveBase>(data.clone()) {
}
explicit Primitive(PrimitiveBase&& data) : alib::wrapper<PrimitiveBase>(std::move(data).plunder()) {
}
}; };
   
Primitive primitiveFrom(int number); Primitive primitiveFrom(int number);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
   
#include "RegExp.h" #include "RegExp.h"
#include "../alphabet/Symbol.h" #include "../alphabet/Symbol.h"
#include "../string/LinearString.h"
#include "unbounded/UnboundedRegExpSymbol.h" #include "unbounded/UnboundedRegExpSymbol.h"
#include "unbounded/UnboundedRegExpEmpty.h" #include "unbounded/UnboundedRegExpEmpty.h"
#include "unbounded/UnboundedRegExpConcatenation.h" #include "unbounded/UnboundedRegExpConcatenation.h"
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include "../common/wrapper.hpp" #include "../common/wrapper.hpp"
#include "RegExpBase.h" #include "RegExpBase.h"
   
#include "../alphabet/Symbol.h" #include "../alphabet/SymbolFeatures.h"
#include "../string/LinearString.h" #include "../string/StringFeatures.h"
#include <string> #include <string>
   
namespace regexp { namespace regexp {
...@@ -21,16 +21,7 @@ namespace regexp { ...@@ -21,16 +21,7 @@ namespace regexp {
* Wrapper around automata. * Wrapper around automata.
*/ */
class RegExp : public alib::wrapper<RegExpBase> { class RegExp : public alib::wrapper<RegExpBase> {
public: using alib::wrapper<RegExpBase>::wrapper;
explicit RegExp(RegExpBase* data) : alib::wrapper<RegExpBase>(data) {
}
explicit RegExp(const RegExpBase& data) : alib::wrapper<RegExpBase>(data.clone()) {
}
explicit RegExp(RegExpBase&& data) : alib::wrapper<RegExpBase>(std::move(data).plunder()) {
}
}; };
   
regexp::RegExp regexpFrom( const std::string& string ); regexp::RegExp regexpFrom( const std::string& string );
......
...@@ -17,16 +17,7 @@ namespace string { ...@@ -17,16 +17,7 @@ namespace string {
* Wrapper around strings. * Wrapper around strings.
*/ */
class String : public alib::wrapper<StringBase> { class String : public alib::wrapper<StringBase> {
public: using alib::wrapper<StringBase>::wrapper;
explicit String(StringBase* data) : alib::wrapper<StringBase>(data) {
}
explicit String(const StringBase& data) : alib::wrapper<StringBase>(data.clone()) {
}
explicit String(StringBase&& data) : alib::wrapper<StringBase>(std::move(data).plunder()) {
}
}; };
   
string::String stringFrom(const alphabet::Symbol& symbol); string::String stringFrom(const alphabet::Symbol& symbol);
......
...@@ -17,16 +17,7 @@ namespace tree { ...@@ -17,16 +17,7 @@ namespace tree {
* Wrapper around tree. * Wrapper around tree.
*/ */
class Tree : public alib::wrapper<TreeBase> { class Tree : public alib::wrapper<TreeBase> {
public: using alib::wrapper<TreeBase>::wrapper;
explicit Tree(TreeBase* data) : alib::wrapper<TreeBase>(data) {
}
explicit Tree(const TreeBase& data) : alib::wrapper<TreeBase>(data.clone()) {
}
explicit Tree(TreeBase&& data) : alib::wrapper<TreeBase>(std::move(data).plunder()) {
}
}; };
   
} /* namespace tree */ } /* namespace tree */
......
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