diff options
author | Adrian Kummerländer | 2014-05-24 13:59:42 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-24 13:59:42 +0200 |
commit | 085935ddd577b0c65b4330318b5ba20492d93126 (patch) | |
tree | b508590d23a3fe7f3a6813313af2abe17fecdf79 /src/support/dom/result_node_facade.h | |
parent | afc8eb29c22447fe2bf71a503a5f2d25b4f8a7c7 (diff) | |
download | InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar.gz InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar.bz2 InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar.lz InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar.xz InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.tar.zst InputXSLT-085935ddd577b0c65b4330318b5ba20492d93126.zip |
Implemented ResultNodeFacade as a DOM node construction helper
* wraps result node construction and appends it to root node on destruction
* offers a simpler interface for common node construction patterns
* simplifies result node construction in all external function implementations
** most noticeable in FunctionReadDirectory
* expanded FunctionReadDirectory result nodes by name, extension, and full-path nodes
Diffstat (limited to 'src/support/dom/result_node_facade.h')
-rw-r--r-- | src/support/dom/result_node_facade.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/support/dom/result_node_facade.h b/src/support/dom/result_node_facade.h new file mode 100644 index 0000000..ccdd850 --- /dev/null +++ b/src/support/dom/result_node_facade.h @@ -0,0 +1,35 @@ +#ifndef INPUTXSLT_SRC_SUPPORT_RESULT_NODE_FACADE_H_ +#define INPUTXSLT_SRC_SUPPORT_RESULT_NODE_FACADE_H_ + +#include <xercesc/dom/DOMDocument.hpp> +#include <xercesc/dom/DOMImplementation.hpp> +#include <xercesc/dom/DOMElement.hpp> + +#include <string> + +namespace InputXSLT { + +class ResultNodeFacade { + public: + ResultNodeFacade( + xercesc::DOMDocument*, + xercesc::DOMNode*, + const std::string& + ); + ~ResultNodeFacade(); + + void setAttribute(const std::string&, const std::string&); + void setValueNode(const std::string&, const std::string&); + void setContent(const std::string&); + void setContent(xercesc::DOMNode*); + + private: + xercesc::DOMDocument* const dom_document_; + xercesc::DOMElement* const result_node_; + xercesc::DOMNode* const root_node_; + +}; + +} + +#endif // INPUTXSLT_SRC_SUPPORT_RESULT_NODE_FACADE_H_ |