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

tiny improvement in xml api

parent 1e4c6641
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,10 @@ bool xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::first ( con ...@@ -16,8 +16,10 @@ bool xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::first ( con
return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
} }
   
std::string xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::xmlTagName ( ) { const std::string & xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::xmlTagName ( ) {
return "AlgorithmCategory"; static std::string xmlTagName = "AlgorithmCategory";
return xmlTagName;
} }
   
void xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::compose ( ext::deque < sax::Token > & out, abstraction::AlgorithmCategories::AlgorithmCategory category ) { void xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::compose ( ext::deque < sax::Token > & out, abstraction::AlgorithmCategories::AlgorithmCategory category ) {
......
...@@ -10,7 +10,7 @@ template < > ...@@ -10,7 +10,7 @@ template < >
struct xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory > { struct xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory > {
static abstraction::AlgorithmCategories::AlgorithmCategory parse ( ext::deque < sax::Token >::iterator & input ); static abstraction::AlgorithmCategories::AlgorithmCategory parse ( ext::deque < sax::Token >::iterator & input );
static bool first ( const ext::deque < sax::Token >::const_iterator & input ); static bool first ( const ext::deque < sax::Token >::const_iterator & input );
static std::string xmlTagName ( ); static const std::string & xmlTagName ( );
static void compose ( ext::deque < sax::Token > & output, abstraction::AlgorithmCategories::AlgorithmCategory category ); static void compose ( ext::deque < sax::Token > & output, abstraction::AlgorithmCategories::AlgorithmCategory category );
}; };
   
......
...@@ -25,8 +25,10 @@ bool xmlApi < abstraction::ParamQualifiers::ParamQualifier >::first ( const ext: ...@@ -25,8 +25,10 @@ bool xmlApi < abstraction::ParamQualifiers::ParamQualifier >::first ( const ext:
return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
} }
   
std::string xmlApi < abstraction::ParamQualifiers::ParamQualifier >::xmlTagName ( ) { const std::string & xmlApi < abstraction::ParamQualifiers::ParamQualifier >::xmlTagName ( ) {
return "ParamQualifier"; static std::string xmlTagName = "ParamQualifier";
return xmlTagName;
} }
   
void xmlApi < abstraction::ParamQualifiers::ParamQualifier >::compose ( ext::deque < sax::Token > & out, abstraction::ParamQualifiers::ParamQualifier paramQualifier ) { void xmlApi < abstraction::ParamQualifiers::ParamQualifier >::compose ( ext::deque < sax::Token > & out, abstraction::ParamQualifiers::ParamQualifier paramQualifier ) {
......
...@@ -10,7 +10,7 @@ template < > ...@@ -10,7 +10,7 @@ template < >
struct xmlApi < abstraction::ParamQualifiers::ParamQualifier > { struct xmlApi < abstraction::ParamQualifiers::ParamQualifier > {
static abstraction::ParamQualifiers::ParamQualifier parse ( ext::deque < sax::Token >::iterator & input ); static abstraction::ParamQualifiers::ParamQualifier parse ( ext::deque < sax::Token >::iterator & input );
static bool first ( const ext::deque < sax::Token >::const_iterator & input ); static bool first ( const ext::deque < sax::Token >::const_iterator & input );
static std::string xmlTagName ( ); static const std::string & xmlTagName ( );
static void compose ( ext::deque < sax::Token > & output, abstraction::ParamQualifiers::ParamQualifier ); static void compose ( ext::deque < sax::Token > & output, abstraction::ParamQualifiers::ParamQualifier );
}; };
   
......
...@@ -74,7 +74,7 @@ template < typename ... Ts > ...@@ -74,7 +74,7 @@ template < typename ... Ts >
struct xmlApi < ext::variant < Ts ... > > { struct xmlApi < ext::variant < Ts ... > > {
static ext::variant < Ts ... > parse ( ext::deque < sax::Token >::iterator & input ); static ext::variant < Ts ... > parse ( ext::deque < sax::Token >::iterator & input );
static bool first ( const ext::deque < sax::Token >::const_iterator & input ); static bool first ( const ext::deque < sax::Token >::const_iterator & input );
static std::string xmlTagName ( ); static const std::string & xmlTagName ( );
static void compose ( ext::deque < sax::Token > & output, const ext::variant < Ts ... > & data ); static void compose ( ext::deque < sax::Token > & output, const ext::variant < Ts ... > & data );
}; };
   
...@@ -89,8 +89,8 @@ bool xmlApi < ext::variant < Ts ... > >::first ( const ext::deque < sax::Token > ...@@ -89,8 +89,8 @@ bool xmlApi < ext::variant < Ts ... > >::first ( const ext::deque < sax::Token >
} }
   
template < typename ... Ts > template < typename ... Ts >
std::string xmlApi < ext::variant < Ts ... > >::xmlTagName ( ) { const std::string & xmlApi < ext::variant < Ts ... > >::xmlTagName ( ) {
throw ::exception::CommonException ( "Variant does not have xmlTagName." ); throw exception::CommonException ( "Variant does not have xmlTagName." );
} }
   
template < typename ... Ts > template < typename ... Ts >
......
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