aboutsummaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-12-01 11:05:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-12-01 11:05:10 +0200
commit899728d08993676b01e722a28f60efb2d076534d (patch)
treeb7ad14010ad75bdc08ed3b9e4e4fe6a5f6371b4f /libxsd/xsd/cxx/tree
parent238774bc0a8a1c07d5fec89135a766a3e3d8494d (diff)
Make the list type a container for its elements
Diffstat (limited to 'libxsd/xsd/cxx/tree')
-rw-r--r--libxsd/xsd/cxx/tree/containers.hxx30
-rw-r--r--libxsd/xsd/cxx/tree/list.hxx20
-rw-r--r--libxsd/xsd/cxx/tree/parsing.txx18
-rw-r--r--libxsd/xsd/cxx/tree/stream-extraction.hxx6
-rw-r--r--libxsd/xsd/cxx/tree/types.hxx21
5 files changed, 51 insertions, 44 deletions
diff --git a/libxsd/xsd/cxx/tree/containers.hxx b/libxsd/xsd/cxx/tree/containers.hxx
index 7cb6bd3..0a05a5e 100644
--- a/libxsd/xsd/cxx/tree/containers.hxx
+++ b/libxsd/xsd/cxx/tree/containers.hxx
@@ -833,15 +833,15 @@ namespace xsd
{
}
- sequence_common (size_type n, const type& x)
- : flags_ (0), container_ (0)
+ sequence_common (size_type n, const type& x, container* c)
+ : flags_ (0), container_ (c)
{
assign (n, x);
}
template <typename I>
- sequence_common (const I& begin, const I& end)
- : flags_ (0), container_ (0)
+ sequence_common (const I& begin, const I& end, container* c)
+ : flags_ (0), container_ (c)
{
assign (begin, end);
}
@@ -1056,26 +1056,26 @@ namespace xsd
//
#ifdef _MSC_VER
explicit
- sequence (size_type n, const T& x = T ())
- : sequence_common (n, x)
+ sequence (size_type n, const T& x = T (), container* c = 0)
+ : sequence_common (n, x, c)
{
}
#else
explicit
- sequence (size_type n)
- : sequence_common (n, T ())
+ sequence (size_type n, container* c = 0)
+ : sequence_common (n, T (), c)
{
}
- sequence (size_type n, const T& x)
- : sequence_common (n, x)
+ sequence (size_type n, const T& x, container* c = 0)
+ : sequence_common (n, x, c)
{
}
#endif
template <typename I>
- sequence (const I& begin, const I& end)
- : sequence_common (begin, end)
+ sequence (const I& begin, const I& end, container* c = 0)
+ : sequence_common (begin, end, c)
{
}
@@ -1315,13 +1315,15 @@ namespace xsd
}
explicit
- sequence (typename base_sequence::size_type n, const T& x = T ())
+ sequence (typename base_sequence::size_type n,
+ const T& x = T (),
+ container* = 0)
: base_sequence (n, x)
{
}
template <typename I>
- sequence (const I& begin, const I& end)
+ sequence (const I& begin, const I& end, container* = 0)
: base_sequence (begin, end)
{
}
diff --git a/libxsd/xsd/cxx/tree/list.hxx b/libxsd/xsd/cxx/tree/list.hxx
index 75972c6..f4367c3 100644
--- a/libxsd/xsd/cxx/tree/list.hxx
+++ b/libxsd/xsd/cxx/tree/list.hxx
@@ -44,14 +44,16 @@ namespace xsd
{
}
- list (typename sequence<T>::size_type n, const T& x)
- : sequence<T> (n, x)
+ list (typename sequence<T>::size_type n,
+ const T& x,
+ container* c = 0)
+ : sequence<T> (n, x, c)
{
}
template<typename I>
- list (const I& b, const I& e)
- : sequence<T> (b, e)
+ list (const I& b, const I& e, container* c = 0)
+ : sequence<T> (b, e, c)
{
}
@@ -92,14 +94,14 @@ namespace xsd
}
explicit
- list (typename sequence<T>::size_type n, const T& x)
- : sequence<T> (n, x)
+ list (typename sequence<T>::size_type n, const T& x, container* c = 0)
+ : sequence<T> (n, x, c)
{
}
template<typename I>
- list (const I& b, const I& e)
- : sequence<T> (b, e)
+ list (const I& b, const I& e, container* c = 0)
+ : sequence<T> (b, e, c)
{
}
@@ -129,4 +131,4 @@ namespace xsd
}
}
-#endif // XSD_CXX_TREE_LIST_HXX
+#endif // XSD_CXX_TREE_LIST_HXX
diff --git a/libxsd/xsd/cxx/tree/parsing.txx b/libxsd/xsd/cxx/tree/parsing.txx
index ebbf17b..929bf02 100644
--- a/libxsd/xsd/cxx/tree/parsing.txx
+++ b/libxsd/xsd/cxx/tree/parsing.txx
@@ -503,14 +503,14 @@ namespace xsd
template <typename C, typename B, typename nmtoken>
nmtokens<C, B, nmtoken>::
nmtokens (const xercesc::DOMElement& e, flags f, container* c)
- : B (e, f, c), base_type (e, f, c)
+ : B (e, f, c), base_type (e, f, this)
{
}
template <typename C, typename B, typename nmtoken>
nmtokens<C, B, nmtoken>::
nmtokens (const xercesc::DOMAttr& a, flags f, container* c)
- : B (a, f, c), base_type (a, f, c)
+ : B (a, f, c), base_type (a, f, this)
{
}
@@ -520,7 +520,7 @@ namespace xsd
const xercesc::DOMElement* e,
flags f,
container* c)
- : B (s, e, f, c), base_type (s, e, f, c)
+ : B (s, e, f, c), base_type (s, e, f, this)
{
}
@@ -669,14 +669,14 @@ namespace xsd
template <typename C, typename B, typename idref>
idrefs<C, B, idref>::
idrefs (const xercesc::DOMElement& e, flags f, container* c)
- : B (e, f, c), base_type (e, f, c)
+ : B (e, f, c), base_type (e, f, this)
{
}
template <typename C, typename B, typename idref>
idrefs<C, B, idref>::
idrefs (const xercesc::DOMAttr& a, flags f, container* c)
- : B (a, f, c), base_type (a, f, c)
+ : B (a, f, c), base_type (a, f, this)
{
}
@@ -686,7 +686,7 @@ namespace xsd
const xercesc::DOMElement* e,
flags f,
container* c)
- : B (s, e, f, c), base_type (s, e, f, c)
+ : B (s, e, f, c), base_type (s, e, f, this)
{
}
@@ -890,14 +890,14 @@ namespace xsd
template <typename C, typename B, typename entity>
entities<C, B, entity>::
entities (const xercesc::DOMElement& e, flags f, container* c)
- : B (e, f, c), base_type (e, f, c)
+ : B (e, f, c), base_type (e, f, this)
{
}
template <typename C, typename B, typename entity>
entities<C, B, entity>::
entities (const xercesc::DOMAttr& a, flags f, container* c)
- : B (a, f, c), base_type (a, f, c)
+ : B (a, f, c), base_type (a, f, this)
{
}
@@ -907,7 +907,7 @@ namespace xsd
const xercesc::DOMElement* e,
flags f,
container* c)
- : B (s, e, f, c), base_type (s, e, f, c)
+ : B (s, e, f, c), base_type (s, e, f, this)
{
}
}
diff --git a/libxsd/xsd/cxx/tree/stream-extraction.hxx b/libxsd/xsd/cxx/tree/stream-extraction.hxx
index 861358d..0052054 100644
--- a/libxsd/xsd/cxx/tree/stream-extraction.hxx
+++ b/libxsd/xsd/cxx/tree/stream-extraction.hxx
@@ -152,7 +152,7 @@ namespace xsd
template <typename S>
inline nmtokens<C, B, nmtoken>::
nmtokens (istream<S>& s, flags f, container* c)
- : B (s, f, c), base_type (s, f, c)
+ : B (s, f, c), base_type (s, f, this)
{
}
@@ -219,7 +219,7 @@ namespace xsd
template <typename S>
inline idrefs<C, B, idref>::
idrefs (istream<S>& s, flags f, container* c)
- : B (s, f, c), base_type (s, f, c)
+ : B (s, f, c), base_type (s, f, this)
{
}
@@ -291,7 +291,7 @@ namespace xsd
template <typename S>
inline entities<C, B, entity>::
entities (istream<S>& s, flags f, container* c)
- : B (s, f, c), base_type (s, f, c)
+ : B (s, f, c), base_type (s, f, this)
{
}
}
diff --git a/libxsd/xsd/cxx/tree/types.hxx b/libxsd/xsd/cxx/tree/types.hxx
index 20bcbe4..0ca0f3e 100644
--- a/libxsd/xsd/cxx/tree/types.hxx
+++ b/libxsd/xsd/cxx/tree/types.hxx
@@ -1014,6 +1014,7 @@ namespace xsd
* @brief Default constructor creates no elements.
*/
nmtokens ()
+ : base_type (0, this)
{
}
@@ -1024,7 +1025,7 @@ namespace xsd
* @param x An exemplar element to copy.
*/
nmtokens (typename base_type::size_type n, const nmtoken& x)
- : base_type (n, x)
+ : base_type (n, x, this)
{
}
@@ -1037,7 +1038,7 @@ namespace xsd
*/
template <typename I>
nmtokens (const I& begin, const I& end)
- : base_type (begin, end)
+ : base_type (begin, end, this)
{
}
@@ -1052,7 +1053,7 @@ namespace xsd
* For polymorphic object models use the @c _clone function instead.
*/
nmtokens (const nmtokens& x, flags f, container* c = 0)
- : B (x, f, c), base_type (x, f, c)
+ : B (x, f, c), base_type (x, f, this)
{
}
@@ -2482,6 +2483,7 @@ namespace xsd
* @brief Default constructor creates no elements.
*/
idrefs ()
+ : base_type (0, this)
{
}
@@ -2492,7 +2494,7 @@ namespace xsd
* @param x An exemplar element to copy.
*/
idrefs (typename base_type::size_type n, const idref& x)
- : base_type (n, x)
+ : base_type (n, x, this)
{
}
@@ -2505,7 +2507,7 @@ namespace xsd
*/
template <typename I>
idrefs (const I& begin, const I& end)
- : base_type (begin, end)
+ : base_type (begin, end, this)
{
}
@@ -2520,7 +2522,7 @@ namespace xsd
* For polymorphic object models use the @c _clone function instead.
*/
idrefs (const idrefs& x, flags f = 0, container* c = 0)
- : B (x, f, c), base_type (x, f, c)
+ : B (x, f, c), base_type (x, f, this)
{
}
@@ -3675,6 +3677,7 @@ namespace xsd
* @brief Default constructor creates no elements.
*/
entities ()
+ : base_type (0, this)
{
}
@@ -3685,7 +3688,7 @@ namespace xsd
* @param x An exemplar element to copy.
*/
entities (typename base_type::size_type n, const entity& x)
- : base_type (n, x)
+ : base_type (n, x, this)
{
}
@@ -3698,7 +3701,7 @@ namespace xsd
*/
template <typename I>
entities (const I& begin, const I& end)
- : base_type (begin, end)
+ : base_type (begin, end, this)
{
}
@@ -3713,7 +3716,7 @@ namespace xsd
* For polymorphic object models use the @c _clone function instead.
*/
entities (const entities& x, flags f = 0, container* c = 0)
- : B (x, f, c), base_type (x, f, c)
+ : B (x, f, c), base_type (x, f, this)
{
}