Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
StringToXmlComposerCommon.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <alib/deque>
9#include <sax/Token.h>
10#include <alib/set>
11#include <alib/vector>
12#include <core/xmlApi.hpp>
13
14namespace string {
15
20public:
21 template < class SymbolType >
23 template < class SymbolType >
24 static void composeContent ( ext::deque < sax::Token > & out, const ext::vector < SymbolType > & content );
25 template < class SymbolType >
26 static void composeWildcard ( ext::deque < sax::Token > & out, const SymbolType & wildcard );
27};
28
29template < class SymbolType >
31 out.emplace_back ( "alphabet", sax::Token::TokenType::START_ELEMENT );
32
33 for ( const SymbolType & symbol : alphabet )
35
36 out.emplace_back ( "alphabet", sax::Token::TokenType::END_ELEMENT );
37}
38
39template < class SymbolType >
41 out.emplace_back ( "content", sax::Token::TokenType::START_ELEMENT );
42
43 for ( const SymbolType & symbol : content )
45
46 out.emplace_back ( "content", sax::Token::TokenType::END_ELEMENT );
47}
48
49template < class SymbolType >
51 out.emplace_back ( "wildcard", sax::Token::TokenType::START_ELEMENT );
52
54
55 out.emplace_back ( "wildcard", sax::Token::TokenType::END_ELEMENT );
56}
57
58} /* namespace string */
59
Definition: set.hpp:44
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Definition: StringToXmlComposerCommon.h:19
static void composeContent(ext::deque< sax::Token > &out, const ext::vector< SymbolType > &content)
Definition: StringToXmlComposerCommon.h:40
static void composeWildcard(ext::deque< sax::Token > &out, const SymbolType &wildcard)
Definition: StringToXmlComposerCommon.h:50
static void composeAlphabet(ext::deque< sax::Token > &out, const ext::set< SymbolType > &alphabet)
Definition: StringToXmlComposerCommon.h:30
Definition: BarSymbol.cpp:12
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: RandomStringFactory.cpp:12
Definition: xmlApi.hpp:27