From 66b31bb316bae6fc6b553699dd87d230f62e9cbb Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sun, 30 Oct 2016 20:10:38 +0100 Subject: [PATCH] concrete ret type in clone and plunder on RegExp --- .../src/regexp/formal/FormalRegExpAlternation.h | 8 ++++---- .../regexp/formal/FormalRegExpConcatenation.h | 16 ++++++++-------- alib2data/src/regexp/formal/FormalRegExpEmpty.h | 8 ++++---- .../src/regexp/formal/FormalRegExpEpsilon.h | 8 ++++---- .../src/regexp/formal/FormalRegExpIteration.h | 8 ++++---- alib2data/src/regexp/formal/FormalRegExpSymbol.h | 8 ++++---- .../unbounded/UnboundedRegExpAlternation.h | 8 ++++---- .../unbounded/UnboundedRegExpConcatenation.h | 8 ++++---- .../src/regexp/unbounded/UnboundedRegExpEmpty.h | 8 ++++---- .../regexp/unbounded/UnboundedRegExpEpsilon.h | 8 ++++---- .../regexp/unbounded/UnboundedRegExpIteration.h | 8 ++++---- .../src/regexp/unbounded/UnboundedRegExpSymbol.h | 8 ++++---- 12 files changed, 52 insertions(+), 52 deletions(-) diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.h b/alib2data/src/regexp/formal/FormalRegExpAlternation.h index 3bbb48af99..b85a7b4fff 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.h +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.h @@ -35,12 +35,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpAlternation < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpAlternation < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -157,12 +157,12 @@ void FormalRegExpAlternation < SymbolType >::setRightElement ( const FormalRegEx } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpAlternation < SymbolType >::clone ( ) const { +FormalRegExpAlternation < SymbolType > * FormalRegExpAlternation < SymbolType >::clone ( ) const { return new FormalRegExpAlternation ( * this ); } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpAlternation < SymbolType >::plunder ( ) && { +FormalRegExpAlternation < SymbolType > * FormalRegExpAlternation < SymbolType >::plunder ( ) && { return new FormalRegExpAlternation ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h index 06b17b62b1..9e701f36b8 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h @@ -34,12 +34,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpConcatenation < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpConcatenation < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -153,10 +153,15 @@ void FormalRegExpConcatenation < SymbolType >::setRightElement ( const FormalReg } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpConcatenation < SymbolType >::clone ( ) const { +FormalRegExpConcatenation < SymbolType > * FormalRegExpConcatenation < SymbolType >::clone ( ) const { return new FormalRegExpConcatenation ( * this ); } +template < class SymbolType > +FormalRegExpConcatenation < SymbolType > * FormalRegExpConcatenation < SymbolType >::plunder ( ) && { + return new FormalRegExpConcatenation ( std::move ( * this ) ); +} + template < class SymbolType > std::smart_ptr < UnboundedRegExpElement < SymbolType > > FormalRegExpConcatenation < SymbolType >::asUnbounded ( ) const { UnboundedRegExpConcatenation < SymbolType > * res = new UnboundedRegExpConcatenation < SymbolType > ( ); @@ -167,11 +172,6 @@ std::smart_ptr < UnboundedRegExpElement < SymbolType > > FormalRegExpConcatenati return std::smart_ptr < UnboundedRegExpElement < SymbolType > > ( res ); } -template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpConcatenation < SymbolType >::plunder ( ) && { - return new FormalRegExpConcatenation ( std::move ( * this ) ); -} - template < class SymbolType > int FormalRegExpConcatenation < SymbolType >::compare ( const FormalRegExpConcatenation < SymbolType > & other ) const { int res = getLeftElement ( ).compare ( other.getLeftElement ( ) ); diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.h b/alib2data/src/regexp/formal/FormalRegExpEmpty.h index 8f340badda..0b946e8d31 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.h +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.h @@ -29,12 +29,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpEmpty < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpEmpty < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -84,12 +84,12 @@ FormalRegExpEmpty < SymbolType >::FormalRegExpEmpty ( ) { } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpEmpty < SymbolType >::clone ( ) const { +FormalRegExpEmpty < SymbolType > * FormalRegExpEmpty < SymbolType >::clone ( ) const { return new FormalRegExpEmpty ( * this ); } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpEmpty < SymbolType >::plunder ( ) && { +FormalRegExpEmpty < SymbolType > * FormalRegExpEmpty < SymbolType >::plunder ( ) && { return new FormalRegExpEmpty ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h index a1aac2390f..2122949d63 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h @@ -29,12 +29,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpEpsilon < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpEpsilon < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -84,12 +84,12 @@ FormalRegExpEpsilon < SymbolType >::FormalRegExpEpsilon ( ) { } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpEpsilon < SymbolType >::clone ( ) const { +FormalRegExpEpsilon < SymbolType > * FormalRegExpEpsilon < SymbolType >::clone ( ) const { return new FormalRegExpEpsilon ( * this ); } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpEpsilon < SymbolType >::plunder ( ) && { +FormalRegExpEpsilon < SymbolType > * FormalRegExpEpsilon < SymbolType >::plunder ( ) && { return new FormalRegExpEpsilon ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.h b/alib2data/src/regexp/formal/FormalRegExpIteration.h index 8566166aac..f911dc75e2 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.h +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.h @@ -33,12 +33,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpIteration < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpIteration < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -128,12 +128,12 @@ void FormalRegExpIteration < SymbolType >::setElement ( const FormalRegExpElemen } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpIteration < SymbolType >::clone ( ) const { +FormalRegExpIteration < SymbolType > * FormalRegExpIteration < SymbolType >::clone ( ) const { return new FormalRegExpIteration ( * this ); } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpIteration < SymbolType >::plunder ( ) && { +FormalRegExpIteration < SymbolType > * FormalRegExpIteration < SymbolType >::plunder ( ) && { return new FormalRegExpIteration ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.h b/alib2data/src/regexp/formal/FormalRegExpSymbol.h index 738a3cb8c7..fa8c727aed 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.h +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.h @@ -35,12 +35,12 @@ public: /** * @copydoc FormalRegExpElement::clone() const */ - FormalRegExpElement < SymbolType > * clone ( ) const override; + FormalRegExpSymbol < SymbolType > * clone ( ) const override; /** * @copydoc FormalRegExpElement::plunder() const */ - FormalRegExpElement < SymbolType > * plunder ( ) && override; + FormalRegExpSymbol < SymbolType > * plunder ( ) && override; /** * @copydoc FormalRegExpElement::clone() const @@ -106,12 +106,12 @@ FormalRegExpSymbol < SymbolType >::FormalRegExpSymbol ( SymbolType symbol ) : sy } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpSymbol < SymbolType >::clone ( ) const { +FormalRegExpSymbol < SymbolType > * FormalRegExpSymbol < SymbolType >::clone ( ) const { return new FormalRegExpSymbol ( * this ); } template < class SymbolType > -FormalRegExpElement < SymbolType > * FormalRegExpSymbol < SymbolType >::plunder ( ) && { +FormalRegExpSymbol < SymbolType > * FormalRegExpSymbol < SymbolType >::plunder ( ) && { return new FormalRegExpSymbol ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h index 91be2c2f31..f4d4e61101 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h @@ -33,12 +33,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpAlternation < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpAlternation < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -124,12 +124,12 @@ void UnboundedRegExpAlternation < SymbolType >::appendElement ( const UnboundedR } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpAlternation < SymbolType >::clone ( ) const { +UnboundedRegExpAlternation < SymbolType > * UnboundedRegExpAlternation < SymbolType >::clone ( ) const { return new UnboundedRegExpAlternation ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpAlternation < SymbolType >::plunder ( ) && { +UnboundedRegExpAlternation < SymbolType > * UnboundedRegExpAlternation < SymbolType >::plunder ( ) && { return new UnboundedRegExpAlternation ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h index f3ef801e1a..eaa21a085d 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h @@ -33,12 +33,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpConcatenation < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpConcatenation < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -124,12 +124,12 @@ void UnboundedRegExpConcatenation < SymbolType >::appendElement ( const Unbounde } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpConcatenation < SymbolType >::clone ( ) const { +UnboundedRegExpConcatenation < SymbolType > * UnboundedRegExpConcatenation < SymbolType >::clone ( ) const { return new UnboundedRegExpConcatenation ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpConcatenation < SymbolType >::plunder ( ) && { +UnboundedRegExpConcatenation < SymbolType > * UnboundedRegExpConcatenation < SymbolType >::plunder ( ) && { return new UnboundedRegExpConcatenation ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h index 015e3d6b95..79fa0e3391 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h @@ -29,12 +29,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpEmpty < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpEmpty < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -84,12 +84,12 @@ UnboundedRegExpEmpty < SymbolType >::UnboundedRegExpEmpty ( ) { } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpEmpty < SymbolType >::clone ( ) const { +UnboundedRegExpEmpty < SymbolType > * UnboundedRegExpEmpty < SymbolType >::clone ( ) const { return new UnboundedRegExpEmpty ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpEmpty < SymbolType >::plunder ( ) && { +UnboundedRegExpEmpty < SymbolType > * UnboundedRegExpEmpty < SymbolType >::plunder ( ) && { return new UnboundedRegExpEmpty ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h index d52576a293..6d254b9301 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h @@ -29,12 +29,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpEpsilon < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpEpsilon < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -84,12 +84,12 @@ UnboundedRegExpEpsilon < SymbolType >::UnboundedRegExpEpsilon ( ) { } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpEpsilon < SymbolType >::clone ( ) const { +UnboundedRegExpEpsilon < SymbolType > * UnboundedRegExpEpsilon < SymbolType >::clone ( ) const { return new UnboundedRegExpEpsilon ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpEpsilon < SymbolType >::plunder ( ) && { +UnboundedRegExpEpsilon < SymbolType > * UnboundedRegExpEpsilon < SymbolType >::plunder ( ) && { return new UnboundedRegExpEpsilon ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h index 1d7455f6ef..31383679cf 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h @@ -33,12 +33,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpIteration < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpIteration < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -128,12 +128,12 @@ void UnboundedRegExpIteration < SymbolType >::setElement ( const UnboundedRegExp } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpIteration < SymbolType >::clone ( ) const { +UnboundedRegExpIteration < SymbolType > * UnboundedRegExpIteration < SymbolType >::clone ( ) const { return new UnboundedRegExpIteration ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpIteration < SymbolType >::plunder ( ) && { +UnboundedRegExpIteration < SymbolType > * UnboundedRegExpIteration < SymbolType >::plunder ( ) && { return new UnboundedRegExpIteration ( std::move ( * this ) ); } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h index 564e8c2fc5..a261dbed13 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h @@ -35,12 +35,12 @@ public: /** * @copydoc UnboundedRegExpElement::clone() const */ - UnboundedRegExpElement < SymbolType > * clone ( ) const override; + UnboundedRegExpSymbol < SymbolType > * clone ( ) const override; /** * @copydoc UnboundedRegExpElement::plunder() const */ - UnboundedRegExpElement < SymbolType > * plunder ( ) && override; + UnboundedRegExpSymbol < SymbolType > * plunder ( ) && override; /** * @copydoc UnboundedRegExpElement::cloneAsFormal() const @@ -108,12 +108,12 @@ UnboundedRegExpSymbol < SymbolType >::UnboundedRegExpSymbol ( SymbolType symbol } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpSymbol < SymbolType >::clone ( ) const { +UnboundedRegExpSymbol < SymbolType > * UnboundedRegExpSymbol < SymbolType >::clone ( ) const { return new UnboundedRegExpSymbol ( * this ); } template < class SymbolType > -UnboundedRegExpElement < SymbolType > * UnboundedRegExpSymbol < SymbolType >::plunder ( ) && { +UnboundedRegExpSymbol < SymbolType > * UnboundedRegExpSymbol < SymbolType >::plunder ( ) && { return new UnboundedRegExpSymbol ( std::move ( * this ) ); } -- GitLab