summaryrefslogtreecommitdiff
path: root/libxsd-frontend/xsd-frontend/semantic-graph/any.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd-frontend/xsd-frontend/semantic-graph/any.cxx')
-rw-r--r--libxsd-frontend/xsd-frontend/semantic-graph/any.cxx59
1 files changed, 28 insertions, 31 deletions
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 <boris@codesynthesis.com>
-// 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 <cutl/compiler/type-info.hxx>
+
#include <xsd-frontend/semantic-graph/any.hxx>
#include <xsd-frontend/semantic-graph/compositors.hxx>
@@ -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_;
+ }
}
}