9#include <ext/algorithm>
43template <
class SymbolType = DefaultSymbolType >
44class WildcardLinearString final :
public core::Components < WildcardLinearString < SymbolType >, ext::set < SymbolType >, component::Set, GeneralAlphabet, SymbolType, component::Value, WildcardSymbol > {
113 return this->
template accessComponent < GeneralAlphabet > ( ).get ( );
122 return std::move ( this->
template accessComponent < GeneralAlphabet > ( ).
get ( ) );
131 this->
template accessComponent < GeneralAlphabet > ( ).add( symbols );
140 return this->
template accessComponent < WildcardSymbol > ( ).get ( );
149 return std::move ( this->
template accessComponent < WildcardSymbol > ( ).
get ( ) );
160 return this->
template accessComponent < WildcardSymbol > ( ).set ( std::move ( wildcard ) );
231 out <<
"(WildcardLinearString";
232 out <<
" content = " << instance.
getContent ( );
241template <
class SymbolType >
243 setContent(std::move(str));
246template <
class SymbolType >
250template <
class SymbolType >
254template <
class SymbolType >
258template <
class SymbolType >
262template <
class SymbolType >
266template <
class SymbolType >
270template <
class SymbolType >
272 if ( getAlphabet().count ( symbol ) == 0 )
275 m_Data.push_back ( std::move ( symbol ) );
278template <
class SymbolType >
283template <
class SymbolType >
285 return std::move ( this->m_Data );
288template <
class SymbolType >
295 this->m_Data = std::move ( str );
298template <
class SymbolType >
300 return this->m_Data.empty ( );
312template <
class SymbolType >
325 return std::find(content.
begin(), content.
end(), symbol) != content.
end();
355template<
class SymbolType >
367 return string.getAlphabet ( ).count ( symbol );
386template <
class SymbolType >
static ext::set< DefaultSymbolType > normalizeAlphabet(ext::set< SymbolType > &&symbols)
Definition: SymbolNormalize.h:50
static ext::vector< DefaultSymbolType > normalizeSymbols(ext::vector< SymbolType > &&symbols)
Definition: SymbolNormalize.h:86
static DefaultSymbolType normalizeSymbol(SymbolType &&symbol)
Definition: SymbolNormalize.h:68
Definition: components.hpp:181
static bool available(const string::WildcardLinearString< SymbolType > &string, const SymbolType &symbol)
Definition: WildcardLinearString.h:366
static void valid(const string::WildcardLinearString< SymbolType > &, const SymbolType &)
Definition: WildcardLinearString.h:376
Definition: components.hpp:25
static void valid(const string::WildcardLinearString< SymbolType > &, const SymbolType &)
Definition: WildcardLinearString.h:346
static bool used(const string::WildcardLinearString< SymbolType > &str, const SymbolType &symbol)
Definition: WildcardLinearString.h:323
static bool available(const string::WildcardLinearString< SymbolType > &, const SymbolType &)
Definition: WildcardLinearString.h:336
Definition: setComponents.hpp:26
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
Output iterator calling a callback function on assignment.
Definition: iterator.hpp:923
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: set.hpp:99
auto end() &
Inherited behavior of end for non-const instance.
Definition: set.hpp:129
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: vector.hpp:125
auto end() &
Inherited behavior of end for non-const instance.
Definition: vector.hpp:155
Linear string.
Definition: LinearString.h:57
Linear wildcard string.
Definition: WildcardLinearString.h:44
bool isEmpty() const
Definition: WildcardLinearString.h:299
const ext::vector< SymbolType > & getContent() const &
Definition: WildcardLinearString.h:279
bool operator==(const WildcardLinearString &other) const
Definition: WildcardLinearString.h:218
void extendAlphabet(const ext::set< SymbolType > &symbols)
Definition: WildcardLinearString.h:130
void setContent(ext::vector< SymbolType > str)
Definition: WildcardLinearString.h:289
friend ext::ostream & operator<<(ext::ostream &out, const WildcardLinearString &instance)
Definition: WildcardLinearString.h:230
const SymbolType & getWildcardSymbol() const &
Definition: WildcardLinearString.h:139
void appendSymbol(SymbolType symbol)
Definition: WildcardLinearString.h:271
bool setWildcardSymbol(SymbolType wildcard)
Definition: WildcardLinearString.h:159
ext::set< SymbolType > && getAlphabet() &&
Definition: WildcardLinearString.h:121
const ext::set< SymbolType > & getAlphabet() const &
Definition: WildcardLinearString.h:112
WildcardLinearString(ext::set< SymbolType > alphabet, ext::vector< SymbolType > str, SymbolType wildcard)
Creates a new instance of the string with a concrete alphabet, content and wildcard.
Definition: WildcardLinearString.h:242
SymbolType && getWildcardSymbol() &&
Definition: WildcardLinearString.h:148
Definition: BarSymbol.cpp:12
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: normalize.hpp:10
Definition: sigHandler.cpp:20
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
void end()
Definition: measurements.cpp:19
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
Definition: RandomStringFactory.cpp:12
static string::WildcardLinearString< > eval(string::WildcardLinearString< SymbolType > &&value)
Definition: WildcardLinearString.h:388
Definition: normalize.hpp:13