From bada6666c70977a058755ccf232e7d67b24adeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:21:29 +0200 Subject: New upstream release --- .../xsd-frontend/semantic-graph/any-attribute.cxx | 57 ++++++++++------------ 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'libxsd-frontend/xsd-frontend/semantic-graph/any-attribute.cxx') diff --git a/libxsd-frontend/xsd-frontend/semantic-graph/any-attribute.cxx b/libxsd-frontend/xsd-frontend/semantic-graph/any-attribute.cxx index e25e742..19b9df2 100644 --- a/libxsd-frontend/xsd-frontend/semantic-graph/any-attribute.cxx +++ b/libxsd-frontend/xsd-frontend/semantic-graph/any-attribute.cxx @@ -1,8 +1,9 @@ // file : xsd-frontend/semantic-graph/any-attribute.cxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file +#include + #include #include @@ -10,30 +11,11 @@ namespace XSDFrontend { namespace SemanticGraph { - namespace RTTI = Cult::RTTI; - - using RTTI::Access; - using RTTI::TypeInfo; - - namespace - { - struct AnyAttributeInit - { - AnyAttributeInit () - { - TypeInfo ti (typeid (AnyAttribute)); - ti.add_base (Access::public_, true, typeid (Nameable)); - RTTI::insert (ti); - } - - } any_attribute_init_; - } - AnyAttribute:: AnyAttribute (Path const& file, - UnsignedLong line, - UnsignedLong column, - WideString const& namespaces) + unsigned long line, + unsigned long column, + String const& namespaces) : Node (file, line, column), prototype_ (0) { @@ -41,11 +23,11 @@ namespace XSDFrontend // chararcter. // - for (Size i (0), j (namespaces.find (L' '));;) + for (size_t i (0), j (namespaces.find (L' '));;) { - if (j != WideString::npos) + if (j != String::npos) { - namespaces_.push_back (WideString (namespaces, i, j - i)); + namespaces_.push_back (String (namespaces, i, j - i)); i = j + 1; j = namespaces.find (L' ', i); @@ -54,7 +36,7 @@ namespace XSDFrontend { // Last element. // - namespaces_.push_back (WideString (namespaces, i)); + namespaces_.push_back (String (namespaces, i)); break; } } @@ -62,8 +44,8 @@ namespace XSDFrontend AnyAttribute:: AnyAttribute (Path const& file, - UnsignedLong line, - UnsignedLong column, + unsigned long line, + unsigned long column, NamespaceIterator begin, NamespaceIterator end) : Node (file, line, column), @@ -110,5 +92,20 @@ namespace XSDFrontend return namespace_ (scope ()); } + + namespace + { + using compiler::type_info; + + struct AnyAttributeInit + { + AnyAttributeInit () + { + type_info ti (typeid (AnyAttribute)); + ti.add_base (typeid (Nameable)); + insert (ti); + } + } any_attribute_init_; + } } } -- cgit v1.2.3