From 1a42646a93475c5510f414236b6c2ddc1c4f98c8 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Wed, 20 Feb 2019 08:22:05 +0100
Subject: [PATCH] documentation of sax interface

---
 alib2xml/src/sax/SaxComposeInterface.cpp | 7 ++++++-
 alib2xml/src/sax/SaxParseInterface.cpp   | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/alib2xml/src/sax/SaxComposeInterface.cpp b/alib2xml/src/sax/SaxComposeInterface.cpp
index a283ef4d87..2c495057c1 100644
--- a/alib2xml/src/sax/SaxComposeInterface.cpp
+++ b/alib2xml/src/sax/SaxComposeInterface.cpp
@@ -110,6 +110,11 @@ void SaxComposeInterface::xmlSAXUserCompose(xmlTextWriterPtr writer, const ext::
 
 namespace {
 
-auto SaxComposeInterfaceString = registration::AbstractRegister < sax::SaxComposeInterface, std::string, const ext::deque < sax::Token > & > ( sax::SaxComposeInterface::composeMemory );
+auto SaxComposeInterfaceString = registration::AbstractRegister < sax::SaxComposeInterface, std::string, const ext::deque < sax::Token > & > ( sax::SaxComposeInterface::composeMemory, "in" ).setDocumentation (
+"Composes the XML to a string.\n\
+\n\
+@param in list of xml tokens\n\
+@return resulting XML as string\n\
+@throws CommonException when an error occurs (e.g. xml tokens incorrectly nested)" );
 
 } /* namespace */
diff --git a/alib2xml/src/sax/SaxParseInterface.cpp b/alib2xml/src/sax/SaxParseInterface.cpp
index 8e3874970e..0a1971fefc 100644
--- a/alib2xml/src/sax/SaxParseInterface.cpp
+++ b/alib2xml/src/sax/SaxParseInterface.cpp
@@ -127,6 +127,11 @@ int SaxParseInterface::xmlSAXUserParse(xmlTextReaderPtr reader, ext::deque<Token
 
 namespace {
 
-auto SaxParseInterfaceToken = registration::AbstractRegister < sax::SaxParseInterface, ext::deque < sax::Token >, const std::string & > ( sax::SaxParseInterface::parseMemory );
+auto SaxParseInterfaceToken = registration::AbstractRegister < sax::SaxParseInterface, ext::deque < sax::Token >, const std::string & > ( sax::SaxParseInterface::parseMemory, "xmlIn" ).setDocumentation (
+"Parses the string containing XML.\n\
+\n\
+@param xmlIn input XML\n\
+@return parsed list of xml tokens\n\
+@throws CommonException when an error occurs (e.g. XML is not valid)" );
 
 } /* namespace */
-- 
GitLab