aboutsummaryrefslogtreecommitdiff
path: root/libxsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-09-23 08:08:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-09-23 08:08:27 +0200
commite3d71a099b63ef0c943233ce5e439750a44635f6 (patch)
treefd6cb224a356e10614e046dba42e7b68968bc847 /libxsd
parenta066f175060a6ada5c60c378ca4dab6e9b571e35 (diff)
Add value_type to one and optional containers
Diffstat (limited to 'libxsd')
-rw-r--r--libxsd/xsd/cxx/tree/containers-wildcard.hxx4
-rw-r--r--libxsd/xsd/cxx/tree/containers.hxx27
2 files changed, 14 insertions, 17 deletions
diff --git a/libxsd/xsd/cxx/tree/containers-wildcard.hxx b/libxsd/xsd/cxx/tree/containers-wildcard.hxx
index 549df73..b2dd53f 100644
--- a/libxsd/xsd/cxx/tree/containers-wildcard.hxx
+++ b/libxsd/xsd/cxx/tree/containers-wildcard.hxx
@@ -28,6 +28,8 @@ namespace xsd
class element_one
{
public:
+ typedef xercesc::DOMElement value_type;
+
~element_one ()
{
if (x_)
@@ -126,6 +128,8 @@ namespace xsd
class element_optional
{
public:
+ typedef xercesc::DOMElement value_type;
+
~element_optional ()
{
if (x_)
diff --git a/libxsd/xsd/cxx/tree/containers.hxx b/libxsd/xsd/cxx/tree/containers.hxx
index cafd79d..adaaed2 100644
--- a/libxsd/xsd/cxx/tree/containers.hxx
+++ b/libxsd/xsd/cxx/tree/containers.hxx
@@ -129,14 +129,12 @@ namespace xsd
class one<T, false>
{
public:
- ~one ();
+ typedef T value_type;
+ ~one ();
one (container*);
-
one (const T&, container*);
-
one (XSD_AUTO_PTR<T>, container*);
-
one (const one&, flags, container*);
one&
@@ -193,16 +191,10 @@ namespace xsd
class one<T, true>
{
public:
- one (container*)
- : present_ (false)
- {
- }
-
- one (const T& x, container*)
- : x_ (x), present_ (true)
- {
- }
+ typedef T value_type;
+ one (container*): present_ (false) {}
+ one (const T& x, container*) : x_ (x), present_ (true) {}
one (const one& x, flags, container*)
: x_ (x.x_), present_ (x.present_)
{
@@ -258,6 +250,8 @@ namespace xsd
class optional<T, false>
{
public:
+ typedef T value_type;
+
~optional ();
explicit
@@ -373,11 +367,10 @@ namespace xsd
class optional<T, true>
{
public:
+ typedef T value_type;
+
explicit
- optional (container* = 0)
- : present_ (false)
- {
- }
+ optional (container* = 0) : present_ (false) {}
explicit
optional (const T&, container* = 0);