From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- .../xsd-frontend/semantic-graph/any.cxx | 59 ++++++++++------------ 1 file changed, 28 insertions(+), 31 deletions(-) (limited to 'libxsd-frontend/xsd-frontend/semantic-graph/any.cxx') diff --git a/libxsd-frontend/xsd-frontend/semantic-graph/any.cxx b/libxsd-frontend/xsd-frontend/semantic-graph/any.cxx index a6c9e72..c8ebc93 100644 --- a/libxsd-frontend/xsd-frontend/semantic-graph/any.cxx +++ b/libxsd-frontend/xsd-frontend/semantic-graph/any.cxx @@ -1,8 +1,9 @@ // file : xsd-frontend/semantic-graph/any.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,31 +11,11 @@ namespace XSDFrontend { namespace SemanticGraph { - namespace RTTI = Cult::RTTI; - - using RTTI::Access; - using RTTI::TypeInfo; - - namespace - { - struct AnyInit - { - AnyInit () - { - TypeInfo ti (typeid (Any)); - ti.add_base (Access::public_, true, typeid (Nameable)); - ti.add_base (Access::public_, true, typeid (Particle)); - RTTI::insert (ti); - } - - } any_init_; - } - Any:: Any (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) { @@ -42,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); @@ -55,7 +36,7 @@ namespace XSDFrontend { // Last element. // - namespaces_.push_back (WideString (namespaces, i)); + namespaces_.push_back (String (namespaces, i)); break; } } @@ -63,8 +44,8 @@ namespace XSDFrontend Any:: Any (Path const& file, - UnsignedLong line, - UnsignedLong column, + unsigned long line, + unsigned long column, NamespaceIterator begin, NamespaceIterator end) : Node (file, line, column), @@ -121,5 +102,21 @@ namespace XSDFrontend return namespace_ (scope); } + + namespace + { + using compiler::type_info; + + struct AnyInit + { + AnyInit () + { + type_info ti (typeid (Any)); + ti.add_base (typeid (Nameable)); + ti.add_base (typeid (Particle)); + insert (ti); + } + } any_init_; + } } } -- cgit v1.2.3