aboutsummaryrefslogtreecommitdiff
path: root/xml/content.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xml/content.hxx')
-rw-r--r--xml/content.hxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/xml/content.hxx b/xml/content.hxx
new file mode 100644
index 0000000..575ef1d
--- /dev/null
+++ b/xml/content.hxx
@@ -0,0 +1,35 @@
+// file : xml/content.hxx
+// copyright : Copyright (c) 2013-2014 Code Synthesis Tools CC
+// license : MIT; see accompanying LICENSE file
+
+#ifndef XML_CONTENT_HXX
+#define XML_CONTENT_HXX
+
+#include <xml/details/pre.hxx>
+
+namespace xml
+{
+ // XML content model. C++11 enum class emulated for C++98.
+ //
+ struct content
+ {
+ enum value
+ {
+ // element characters whitespaces notes
+ empty, // no no ignored
+ simple, // no yes preserved content accumulated
+ complex, // yes no ignored
+ mixed // yes yes preserved
+ };
+
+ content (value v): v_ (v) {};
+ operator value () const {return v_;}
+
+ private:
+ value v_;
+ };
+}
+
+#include <xml/details/post.hxx>
+
+#endif // XML_CONTENT_HXX