summaryrefslogtreecommitdiffstats
path: root/xmlserializer/XmlStringDocSink.h
diff options
context:
space:
mode:
Diffstat (limited to 'xmlserializer/XmlStringDocSink.h')
-rw-r--r--xmlserializer/XmlStringDocSink.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/xmlserializer/XmlStringDocSink.h b/xmlserializer/XmlStringDocSink.h
index 2d777fa..576b244 100644
--- a/xmlserializer/XmlStringDocSink.h
+++ b/xmlserializer/XmlStringDocSink.h
@@ -1,6 +1,6 @@
/*
* INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
+ * Copyright © 2013 Intel
* Corporation All Rights Reserved.
*
* The source code contained or described herein and all documents related to
@@ -18,25 +18,42 @@
* of the Materials, either expressly, by implication, inducement, estoppel or
* otherwise. Any license under such intellectual property rights must be
* express and approved by Intel in writing.
- *
- * CREATED: 2012-08-10
*/
#pragma once
-
+#include <string>
#include "XmlDocSink.h"
#include "XmlSource.h"
+using std::string;
+
+/**
+ * Sink class that writes the content of any CXmlDocSource into a string.
+ * A reference to an empty string is given in the constructor.
+ */
class CXmlStringDocSink : public CXmlDocSink
{
public:
+ /** Constructor
+ *
+ * @param[out] strResult a reference to a string that will be filled by the doProcess method
+ */
CXmlStringDocSink(string& strResult);
private:
- // Source processing
+ /** Implementation of CXmlDocSink::doProcess()
+ * Writes the content of the xmlDocSource in strResult
+ *
+ * @param[in] xmlDocSource is the source containing the Xml document
+ * @param[out] serializingContext is used as error output
+ *
+ * @return false if any error occurs
+ */
virtual bool doProcess(CXmlDocSource& xmlDocSource, CXmlSerializingContext& serializingContext);
- // Result string containing the XML informations
+ /**
+ * Result string containing the XML informations
+ */
string& _strResult;
};