diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-05-09 16:24:44 -0700 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-05-09 16:24:44 -0700 |
commit | 41569646f9b5e70e53769e24d5e8efe45c2d24b4 (patch) | |
tree | ac973b8eedc7341793675746c67381d742b7cf36 /xml/content.hxx | |
parent | 850aca7f66a32f3301795c207926beef5165c45a (diff) |
Move content model enum out of parser and into xml namespace
Diffstat (limited to 'xml/content.hxx')
-rw-r--r-- | xml/content.hxx | 35 |
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 |