aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-05-09 17:23:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-05-09 17:23:47 +0200
commit90801c5afeb37e4297076bdd5354ba41a7009a3f (patch)
tree98960b76e80c46814f38d345c63d9fb6edcc5f22
parentcf2783f792ee634ffbbb36311c9f69956b1d107e (diff)
Use standard types instead of ones from libcult
-rw-r--r--tests/dump/driver.cxx69
-rw-r--r--xsd-frontend/parser.cxx392
-rw-r--r--xsd-frontend/parser.hxx21
-rw-r--r--xsd-frontend/semantic-graph/annotation.hxx12
-rw-r--r--xsd-frontend/semantic-graph/any-attribute.cxx10
-rw-r--r--xsd-frontend/semantic-graph/any-attribute.hxx12
-rw-r--r--xsd-frontend/semantic-graph/any.cxx10
-rw-r--r--xsd-frontend/semantic-graph/any.hxx12
-rw-r--r--xsd-frontend/semantic-graph/attribute-group.cxx2
-rw-r--r--xsd-frontend/semantic-graph/attribute-group.hxx4
-rw-r--r--xsd-frontend/semantic-graph/attribute.cxx10
-rw-r--r--xsd-frontend/semantic-graph/attribute.hxx14
-rw-r--r--xsd-frontend/semantic-graph/complex.cxx2
-rw-r--r--xsd-frontend/semantic-graph/complex.hxx16
-rw-r--r--xsd-frontend/semantic-graph/compositors.cxx8
-rw-r--r--xsd-frontend/semantic-graph/compositors.hxx38
-rw-r--r--xsd-frontend/semantic-graph/element-group.cxx2
-rw-r--r--xsd-frontend/semantic-graph/element-group.hxx4
-rw-r--r--xsd-frontend/semantic-graph/element.cxx8
-rw-r--r--xsd-frontend/semantic-graph/element.hxx18
-rw-r--r--xsd-frontend/semantic-graph/elements.cxx4
-rw-r--r--xsd-frontend/semantic-graph/elements.hxx106
-rw-r--r--xsd-frontend/semantic-graph/enumeration.cxx4
-rw-r--r--xsd-frontend/semantic-graph/enumeration.hxx4
-rw-r--r--xsd-frontend/semantic-graph/fundamental.cxx.m412
-rw-r--r--xsd-frontend/semantic-graph/fundamental.hxx.m412
-rw-r--r--xsd-frontend/semantic-graph/list.cxx2
-rw-r--r--xsd-frontend/semantic-graph/list.hxx2
-rw-r--r--xsd-frontend/semantic-graph/namespace.cxx2
-rw-r--r--xsd-frontend/semantic-graph/namespace.hxx4
-rw-r--r--xsd-frontend/semantic-graph/particle.cxx2
-rw-r--r--xsd-frontend/semantic-graph/particle.hxx26
-rw-r--r--xsd-frontend/semantic-graph/schema.cxx2
-rw-r--r--xsd-frontend/semantic-graph/schema.hxx24
-rw-r--r--xsd-frontend/semantic-graph/union.cxx2
-rw-r--r--xsd-frontend/semantic-graph/union.hxx2
-rw-r--r--xsd-frontend/transformations/anonymous.cxx68
-rw-r--r--xsd-frontend/transformations/anonymous.hxx4
-rw-r--r--xsd-frontend/transformations/enum-synthesis.cxx8
-rw-r--r--xsd-frontend/transformations/enum-synthesis.hxx2
-rw-r--r--xsd-frontend/transformations/restriction.cxx20
-rw-r--r--xsd-frontend/transformations/restriction.hxx2
-rw-r--r--xsd-frontend/transformations/schema-per-type.cxx34
-rw-r--r--xsd-frontend/transformations/schema-per-type.hxx4
-rw-r--r--xsd-frontend/transformations/simplifier.cxx14
-rw-r--r--xsd-frontend/transformations/simplifier.hxx2
-rw-r--r--xsd-frontend/traversal/attribute-group.cxx6
-rw-r--r--xsd-frontend/traversal/attribute-group.hxx6
-rw-r--r--xsd-frontend/traversal/attribute.cxx12
-rw-r--r--xsd-frontend/traversal/attribute.hxx12
-rw-r--r--xsd-frontend/traversal/complex.cxx16
-rw-r--r--xsd-frontend/traversal/complex.hxx16
-rw-r--r--xsd-frontend/traversal/compositors.cxx44
-rw-r--r--xsd-frontend/traversal/compositors.hxx44
-rw-r--r--xsd-frontend/traversal/element-group.cxx10
-rw-r--r--xsd-frontend/traversal/element-group.hxx10
-rw-r--r--xsd-frontend/traversal/element.cxx12
-rw-r--r--xsd-frontend/traversal/element.hxx12
-rw-r--r--xsd-frontend/traversal/elements.cxx20
-rw-r--r--xsd-frontend/traversal/elements.hxx64
-rw-r--r--xsd-frontend/traversal/enumeration.cxx24
-rw-r--r--xsd-frontend/traversal/enumeration.hxx24
-rw-r--r--xsd-frontend/traversal/list.cxx12
-rw-r--r--xsd-frontend/traversal/list.hxx12
-rw-r--r--xsd-frontend/traversal/namespace.hxx8
-rw-r--r--xsd-frontend/traversal/particle.cxx6
-rw-r--r--xsd-frontend/traversal/particle.hxx6
-rw-r--r--xsd-frontend/traversal/schema.hxx16
-rw-r--r--xsd-frontend/traversal/union.cxx12
-rw-r--r--xsd-frontend/traversal/union.hxx12
-rw-r--r--xsd-frontend/types.hxx4
-rw-r--r--xsd-frontend/xml.hxx62
72 files changed, 756 insertions, 758 deletions
diff --git a/tests/dump/driver.cxx b/tests/dump/driver.cxx
index 53dd6eb..0d98e10 100644
--- a/tests/dump/driver.cxx
+++ b/tests/dump/driver.cxx
@@ -17,16 +17,14 @@
using namespace Cult::Types;
using namespace XSDFrontend;
-using std::wcerr;
-using std::wcout;
-using std::endl;
+using namespace std;
-UnsignedLong indent = 0;
+static unsigned long indent;
std::wostream&
ind (std::wostream& os)
{
- for (UnsignedLong n (0); n < indent; ++n)
+ for (unsigned long n (0); n < indent; ++n)
os << L" ";
return os;
@@ -48,7 +46,7 @@ namespace
struct List: Traversal::List
{
- virtual Void
+ virtual void
traverse (Type& l)
{
if (l.annotated_p ())
@@ -78,7 +76,7 @@ namespace
struct Union: Traversal::Union
{
- virtual Void
+ virtual void
traverse (Type& u)
{
if (u.annotated_p ())
@@ -114,7 +112,7 @@ namespace
struct Enumerator: Traversal::Enumerator
{
- virtual Void
+ virtual void
traverse (Type& e)
{
if (e.annotated_p ())
@@ -127,7 +125,7 @@ namespace
struct Enumeration: Traversal::Enumeration
{
- virtual Void
+ virtual void
traverse (Type& e)
{
if (e.annotated_p ())
@@ -149,7 +147,7 @@ namespace
struct ContainsParticle: Traversal::ContainsParticle
{
- virtual Void
+ virtual void
traverse (Type& cp)
{
wcout << ind << "[" << cp.min () << ", ";
@@ -165,7 +163,7 @@ namespace
struct ContainsCompositor: Traversal::ContainsCompositor
{
- virtual Void
+ virtual void
traverse (Type& cc)
{
wcout << ind << "[" << cc.min () << ", ";
@@ -183,7 +181,7 @@ namespace
Traversal::Choice,
Traversal::Sequence
{
- virtual Void
+ virtual void
traverse (SemanticGraph::All& a)
{
wcout << "all" << endl
@@ -198,7 +196,7 @@ namespace
wcout << ind << "}" << endl;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Choice& c)
{
wcout << "choice" << endl
@@ -213,7 +211,7 @@ namespace
wcout << ind << "}" << endl;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Sequence& s)
{
wcout << "sequence" << endl
@@ -231,7 +229,7 @@ namespace
struct Attribute: Traversal::Attribute
{
- virtual Void
+ virtual void
traverse (Type& a)
{
if (a.annotated_p ())
@@ -266,7 +264,7 @@ namespace
struct AnyAttribute: Traversal::AnyAttribute
{
- virtual Void
+ virtual void
traverse (Type& a)
{
if (a.annotated_p ())
@@ -279,7 +277,7 @@ namespace
struct Element: Traversal::Element
{
- virtual Void
+ virtual void
traverse (Type& e)
{
wcout << "element " << e.name ();
@@ -309,7 +307,7 @@ namespace
struct ElementFlat: Traversal::Element
{
- virtual Void
+ virtual void
traverse (Type& e)
{
if (e.annotated_p ())
@@ -329,7 +327,7 @@ namespace
struct Any: Traversal::Any
{
- virtual Void
+ virtual void
traverse (Type& a)
{
wcout << "any '" << a.name () << "'" << endl;
@@ -338,7 +336,7 @@ namespace
struct AnyFlat: Traversal::Any
{
- virtual Void
+ virtual void
traverse (Type& a)
{
if (a.annotated_p ())
@@ -351,7 +349,7 @@ namespace
struct Complex: Traversal::Complex
{
- virtual Void
+ virtual void
traverse (Type& c)
{
// Anonymous type definition can recursively refer to itself.
@@ -389,7 +387,7 @@ namespace
struct GlobalAttribute: Traversal::Attribute
{
- virtual Void
+ virtual void
traverse (Type& a)
{
if (a.annotated_p ())
@@ -423,7 +421,7 @@ namespace
struct GlobalElement: Traversal::Element
{
- virtual Void
+ virtual void
traverse (Type& e)
{
if (e.annotated_p ())
@@ -457,7 +455,7 @@ namespace
struct Namespace: Traversal::Namespace
{
- virtual Void
+ virtual void
traverse (Type& n)
{
wcout << ind << "namespace " << n.name () << endl
@@ -477,21 +475,21 @@ namespace
Traversal::Sources
//Traversal::Implies @@ Need a --with-implies option
{
- virtual Void
+ virtual void
traverse (SemanticGraph::Imports& i)
{
if (traverse_uses (i, "imports"))
Traversal::Imports::traverse (i);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Includes& i)
{
if (traverse_uses (i, "includes"))
Traversal::Includes::traverse (i);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Sources& s)
{
if (traverse_uses (s, "sources"))
@@ -499,7 +497,7 @@ namespace
}
/*
- virtual Void
+ virtual void
traverse (SemanticGraph::Implies& i)
{
if (traverse_uses (i, "implies"))
@@ -507,7 +505,7 @@ namespace
}
*/
- Boolean
+ bool
traverse_uses (SemanticGraph::Uses& u, String const& type)
{
SemanticGraph::Schema& s (u.schema ());
@@ -531,7 +529,7 @@ namespace
struct Schema: Traversal::Schema
{
- virtual Void
+ virtual void
traverse (Type& s)
{
wcout << ind << "{" << endl;
@@ -556,9 +554,8 @@ struct AnonymousNameTranslator: Transformations::AnonymousNameTranslator
}
};
-
-Int
-main (Int argc, Char* argv[])
+int
+main (int argc, Char* argv[])
{
try
{
@@ -571,8 +568,8 @@ main (Int argc, Char* argv[])
// Parse options.
//
Int i (1);
- Boolean anon (false);
- Boolean enum_synth (false);
+ bool anon (false);
+ bool enum_synth (false);
for (; i < argc; ++i)
{
@@ -589,7 +586,7 @@ main (Int argc, Char* argv[])
SemanticGraph::Path path (argv[i], boost::filesystem::native);
Parser parser (true, false, true);
- Evptr<SemanticGraph::Schema> tu (parser.parse (path));
+ auto_ptr<SemanticGraph::Schema> tu (parser.parse (path));
//
//
diff --git a/xsd-frontend/parser.cxx b/xsd-frontend/parser.cxx
index 1ed7343..782b01f 100644
--- a/xsd-frontend/parser.cxx
+++ b/xsd-frontend/parser.cxx
@@ -6,6 +6,8 @@
#include <map>
#include <stack>
#include <vector>
+#include <iostream>
+#include <sstream>
#include <cutl/compiler/type-id.hxx>
@@ -39,13 +41,7 @@
#include <xercesc/framework/LocalFileInputSource.hpp>
#include <xercesc/framework/Wrapper4InputSource.hpp>
-#include <iostream>
-#include <sstream>
-#include <memory> // std::auto_ptr
-
-using std::wcout;
-using std::wcerr;
-using std::endl;
+using namespace std;
using cutl::compiler::type_id;
@@ -56,7 +52,7 @@ namespace XSDFrontend
//@@ Port to tracing facility.
//
- Boolean trace_ = false;
+ bool trace_ = false;
String const xsd = L"http://www.w3.org/2001/XMLSchema";
String const xse = L"http://www.codesynthesis.com/xmlns/xml-schema-extension";
@@ -116,7 +112,7 @@ namespace XSDFrontend
{
typedef Cult::StringTemplate<C> String;
- Size size (s.size ());
+ size_t size (s.size ());
if (size == 0)
return s;
@@ -228,7 +224,7 @@ namespace XSDFrontend
//
typedef std::map<String, String> Facets;
- Void
+ void
copy_facets (Restricts& r, Facets const& f)
{
for (Facets::const_iterator i (f.begin ()), e (f.end ()); i != e; ++i)
@@ -255,7 +251,7 @@ namespace XSDFrontend
struct ElementGroupRef
{
ElementGroupRef (String const& uq_name_, String const& ns_name_,
- UnsignedLong min_, UnsignedLong max_,
+ unsigned long min_, unsigned long max_,
Compositor& compositor, Scope& scope)
: uq_name (uq_name_), ns_name (ns_name_),
min (min_), max (max_)
@@ -270,7 +266,7 @@ namespace XSDFrontend
}
ElementGroupRef (String const& uq_name_, String const& ns_name_,
- UnsignedLong min_, UnsignedLong max_,
+ unsigned long min_, unsigned long max_,
Scope& scope)
: uq_name (uq_name_), ns_name (ns_name_),
min (min_), max (max_)
@@ -282,7 +278,7 @@ namespace XSDFrontend
String uq_name;
String ns_name;
- UnsignedLong min, max;
+ unsigned long min, max;
Compositor::ContainsIterator contains_pos;
Scope::NamesIterator names_pos;
};
@@ -327,14 +323,14 @@ namespace XSDFrontend
}
template <typename E>
- Void
+ void
add_edge_left (E& e)
{
node_.add_edge_left (e, arg_);
}
template <typename E>
- Void
+ void
add_edge_right (E& e)
{
node_.add_edge_right (e, arg_);
@@ -361,7 +357,7 @@ namespace XSDFrontend
Traversal::Compositor
{
Resolver (Schema& s,
- Boolean& valid,
+ bool& valid,
NamespaceMap& cache,
DefaultValues& default_values)
: s_ (s),
@@ -372,7 +368,7 @@ namespace XSDFrontend
*this >> contains_compositor >> *this;
}
- Void
+ void
traverse (SemanticGraph::Attribute& a)
{
// Avoid traversing attribute more than once.
@@ -385,13 +381,13 @@ namespace XSDFrontend
}
}
- Void
+ void
traverse (SemanticGraph::Element& e)
{
resolve_element (e);
}
- Void
+ void
resolve_element (SemanticGraph::Element& e)
{
// Avoid resolving element more than once.
@@ -442,7 +438,7 @@ namespace XSDFrontend
}
}
- Void
+ void
resolve_member (SemanticGraph::Member& m)
{
using SemanticGraph::Member;
@@ -581,19 +577,19 @@ namespace XSDFrontend
}
}
- Void
+ void
traverse (SemanticGraph::Fundamental::IdRef& i)
{
ref_type (i);
}
- Void
+ void
traverse (SemanticGraph::Fundamental::IdRefs& i)
{
ref_type (i);
}
- Void
+ void
ref_type (SemanticGraph::Specialization& s)
{
if (s.context ().count ("type-ns-name"))
@@ -621,7 +617,7 @@ namespace XSDFrontend
}
}
- Void
+ void
traverse (SemanticGraph::List& l)
{
if (l.context ().count ("type-ns-name"))
@@ -651,7 +647,7 @@ namespace XSDFrontend
Traversal::List::traverse (l);
}
- Void
+ void
traverse (SemanticGraph::Union& u)
{
using SemanticGraph::Union;
@@ -692,7 +688,7 @@ namespace XSDFrontend
Traversal::Union::traverse (u);
}
- Void
+ void
traverse (SemanticGraph::Complex& c)
{
// Avoid traversing complex type more than once.
@@ -791,7 +787,7 @@ namespace XSDFrontend
Traversal::Complex::traverse (c);
}
- Void
+ void
traverse (SemanticGraph::Enumeration& e)
{
// Resolve base type if any.
@@ -832,7 +828,7 @@ namespace XSDFrontend
Traversal::Enumeration::traverse (e);
}
- Void
+ void
traverse (SemanticGraph::ElementGroup& g)
{
// Avoid traversing groups more than once.
@@ -853,7 +849,7 @@ namespace XSDFrontend
// We need a "shallow" resolve to break possible recursing:
// group->element->complexType->group.
//
- Void
+ void
resolve_element_group (SemanticGraph::ElementGroup& g)
{
using SemanticGraph::Scope;
@@ -876,7 +872,7 @@ namespace XSDFrontend
}
}
- Void
+ void
traverse (SemanticGraph::AttributeGroup& g)
{
// Avoid traversing groups more than once.
@@ -908,7 +904,7 @@ namespace XSDFrontend
Traversal::AttributeGroup::traverse (g);
}
- Void
+ void
traverse (SemanticGraph::Compositor& c)
{
using SemanticGraph::Compositor;
@@ -1086,7 +1082,7 @@ namespace XSDFrontend
// order to put it into the scope. Note that we cannot reuse
// the name from the prototype.
- UnsignedLong count;
+ unsigned long count;
SemanticGraph::Context& ctx (scope.context ());
if (!ctx.count ("any-name-count"))
@@ -1095,9 +1091,9 @@ namespace XSDFrontend
ctx.set ("any-name-count", count);
}
else
- count = ++(ctx.get<UnsignedLong> ("any-name-count"));
+ count = ++(ctx.get<unsigned long> ("any-name-count"));
- std::basic_ostringstream<WideChar> os;
+ std::basic_ostringstream<wchar_t> os;
os << "any #" << count;
NodeArgs<Scope, Scope::NamesIterator> na (scope, pos);
@@ -1161,7 +1157,7 @@ namespace XSDFrontend
return copy;
}
- Void
+ void
clone_attribute_group_content (AttributeGroupRef& ref,
SemanticGraph::Scope& s)
{
@@ -1248,7 +1244,7 @@ namespace XSDFrontend
// one in order to put it into the scope. Note that we cannot
// reuse the name from the attribute group.
- UnsignedLong count;
+ unsigned long count;
SemanticGraph::Context& ctx (s.context ());
if (!ctx.count ("any-attribute-name-count"))
@@ -1257,9 +1253,9 @@ namespace XSDFrontend
ctx.set ("any-attribute-name-count", count);
}
else
- count = ++(ctx.get<UnsignedLong> ("any-attribute-name-count"));
+ count = ++(ctx.get<unsigned long> ("any-attribute-name-count"));
- std::basic_ostringstream<WideChar> os;
+ std::basic_ostringstream<wchar_t> os;
os << "any-attribute #" << count;
NodeArgs<Scope, Scope::NamesIterator> na (s, pos);
@@ -1291,7 +1287,7 @@ namespace XSDFrontend
private:
Schema& s_;
- Boolean& valid_;
+ bool& valid_;
NamespaceMap& cache_;
DefaultValues& default_values_;
@@ -1305,7 +1301,7 @@ namespace XSDFrontend
//
struct FilePathComparator
{
- Boolean
+ bool
operator () (SemanticGraph::Path const& x,
SemanticGraph::Path const& y) const
{
@@ -1321,43 +1317,43 @@ namespace XSDFrontend
public:
~Impl ();
- Impl (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check,
+ Impl (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check,
LocationTranslator*,
const WarningSet*);
- Evptr<Schema>
+ auto_ptr<Schema>
parse (Path const&);
- Evptr<Schema>
+ auto_ptr<Schema>
parse (Paths const&);
- Evptr<Schema>
+ auto_ptr<Schema>
xml_schema (Path const&);
private:
- Void
+ void
fill_xml_schema (Schema&, Path const&);
private:
XML::AutoPtr<Xerces::DOMDocument>
- dom (SemanticGraph::Path const&, Boolean validate);
+ dom (SemanticGraph::Path const&, bool validate);
- Void
+ void
schema (XML::Element const&);
SemanticGraph::Annotation*
- annotation (Boolean process);
+ annotation (bool process);
- Void
+ void
import (XML::Element const&);
- Void
+ void
include (XML::Element const&);
- Void
- element_group (XML::Element const&, Boolean in_compositor);
+ void
+ element_group (XML::Element const&, bool in_compositor);
SemanticGraph::Type*
simple_type (XML::Element const&);
@@ -1371,7 +1367,7 @@ namespace XSDFrontend
SemanticGraph::Type*
restriction (XML::Element const& r, XML::Element const& type);
- Void
+ void
enumeration (XML::Element const&);
SemanticGraph::Type*
@@ -1381,46 +1377,46 @@ namespace XSDFrontend
all (XML::Element const&);
Choice*
- choice (XML::Element const&, Boolean in_compositor);
+ choice (XML::Element const&, bool in_compositor);
Sequence*
- sequence (XML::Element const&, Boolean in_compositor);
+ sequence (XML::Element const&, bool in_compositor);
- Void
+ void
simple_content (XML::Element const&);
- Void
+ void
complex_content (XML::Element const&, Complex&);
- Void
+ void
simple_content_extension (XML::Element const&);
- Void
+ void
simple_content_restriction (XML::Element const&);
- Void
+ void
complex_content_extension (XML::Element const&, Complex&);
- Void
+ void
complex_content_restriction (XML::Element const&, Complex&);
- Void
- element (XML::Element const&, Boolean global);
+ void
+ element (XML::Element const&, bool global);
- Void
- attribute (XML::Element const&, Boolean global);
+ void
+ attribute (XML::Element const&, bool global);
- Void
+ void
attribute_group (XML::Element const&);
- Void
+ void
any (XML::Element const&);
- Void
+ void
any_attribute (XML::Element const&);
private:
- Boolean
+ bool
is_disabled (Char const* warning)
{
return disabled_warnings_all_ ||
@@ -1429,7 +1425,7 @@ namespace XSDFrontend
}
private:
- Boolean
+ bool
more () const
{
iterator const& it (iteration_state_.top ());
@@ -1446,7 +1442,7 @@ namespace XSDFrontend
dynamic_cast<Xerces::DOMElement*> (it.l_->item (it.i_++)));
}
- Void
+ void
prev ()
{
iterator& it (iteration_state_.top ());
@@ -1455,26 +1451,26 @@ namespace XSDFrontend
--it.i_;
}
- Void
+ void
push (XML::Element const& e)
{
iteration_state_.push (e.dom_element ());
}
- Void
+ void
pop ()
{
iteration_state_.pop ();
}
private:
- Void
+ void
push_scope (SemanticGraph::Scope& s)
{
scope_stack_.push (&s);
}
- Void
+ void
pop_scope ()
{
scope_stack_.pop ();
@@ -1487,13 +1483,13 @@ namespace XSDFrontend
}
private:
- Void
+ void
push_compositor (SemanticGraph::Compositor& c)
{
compositor_stack_.push (&c);
}
- Void
+ void
pop_compositor ()
{
assert (!compositor_stack_.empty ());
@@ -1508,22 +1504,22 @@ namespace XSDFrontend
}
private:
- static UnsignedLong const unbounded = ~static_cast<UnsignedLong> (0);
+ static unsigned long const unbounded = ~static_cast<unsigned long> (0);
- UnsignedLong
+ unsigned long
parse_min (String const& m)
{
if (m.empty ())
return 1;
- UnsignedLong v;
- std::basic_istringstream<WideChar> is (m);
+ unsigned long v;
+ std::basic_istringstream<wchar_t> is (m);
is >> v;
return v;
}
- UnsignedLong
+ unsigned long
parse_max (String const& m)
{
if (m.empty ())
@@ -1532,8 +1528,8 @@ namespace XSDFrontend
if (m == L"unbounded")
return unbounded;
- UnsignedLong v;
- std::basic_istringstream<WideChar> is (m);
+ unsigned long v;
+ std::basic_istringstream<wchar_t> is (m);
is >> v;
return v;
@@ -1631,13 +1627,13 @@ namespace XSDFrontend
}
Xerces::DOMNodeList* l_;
- Size i_;
+ size_t i_;
};
std::stack<iterator> iteration_state_;
SemanticGraph::Schema* s_; // root schema file
SemanticGraph::Schema* cur_; // current schema file
- Boolean cur_chameleon_; // whethere cur_ is chameleon
+ bool cur_chameleon_; // whethere cur_ is chameleon
SemanticGraph::Schema* xml_schema_; // XML Schema file
SemanticGraph::Path xml_schema_path_;
@@ -1661,7 +1657,7 @@ namespace XSDFrontend
}
- friend Boolean
+ friend bool
operator< (SchemaId const& x, SchemaId const& y)
{
return x.path_.native_file_string () < y.path_.native_file_string ()
@@ -1709,26 +1705,26 @@ namespace XSDFrontend
DefaultValues default_values_;
private:
- Boolean qualify_attribute_;
- Boolean qualify_element_;
+ bool qualify_attribute_;
+ bool qualify_element_;
- Boolean valid_;
+ bool valid_;
- Boolean proper_restriction_;
- Boolean multiple_imports_;
- Boolean full_schema_check_;
+ bool proper_restriction_;
+ bool multiple_imports_;
+ bool full_schema_check_;
LocationTranslator* loc_translator_;
const WarningSet* disabled_warnings_;
- Boolean disabled_warnings_all_;
+ bool disabled_warnings_all_;
NamespaceMap* cache_;
};
Parser::Impl::
- Impl (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check,
+ Impl (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check,
LocationTranslator* t,
const WarningSet* dw)
: s_ (0),
@@ -1770,7 +1766,7 @@ namespace XSDFrontend
return node;
}
- Void Parser::Impl::
+ void Parser::Impl::
fill_xml_schema (Schema& s, Path const& path)
{
Namespace& ns (s.new_node<Namespace> (path, 1, 1));
@@ -1869,12 +1865,12 @@ namespace XSDFrontend
}
- Evptr<Schema> Parser::Impl::
+ auto_ptr<Schema> Parser::Impl::
xml_schema (Path const& tu)
{
valid_ = true;
- Evptr<Schema> rs (new Schema (tu, 1, 1));
+ auto_ptr<Schema> rs (new Schema (tu, 1, 1));
fill_xml_schema (*rs, tu);
if (!valid_)
@@ -1882,7 +1878,7 @@ namespace XSDFrontend
return rs;
}
- Evptr<Schema> Parser::Impl::
+ auto_ptr<Schema> Parser::Impl::
parse (Path const& tu)
{
valid_ = true;
@@ -1906,7 +1902,7 @@ namespace XSDFrontend
if (trace_)
wcout << "target namespace: " << ns << endl;
- Evptr<Schema> rs (new Schema (tu, root.line (), root.column ()));
+ auto_ptr<Schema> rs (new Schema (tu, root.line (), root.column ()));
// Implied schema with fundamental types.
//
@@ -1959,7 +1955,7 @@ namespace XSDFrontend
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
Schema& s (u.schema ());
@@ -1990,19 +1986,19 @@ namespace XSDFrontend
belongs_.node_traverser (d);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Attribute& a)
{
traverse_member (a);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Element& e)
{
traverse_member (e);
}
- Void
+ void
traverse_member (SemanticGraph::Member& m)
{
if (m.typed_p () &&
@@ -2028,7 +2024,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Type& t)
{
if (!t.named_p ())
@@ -2108,7 +2104,7 @@ namespace XSDFrontend
return rs;
}
- Evptr<Schema> Parser::Impl::
+ auto_ptr<Schema> Parser::Impl::
parse (Paths const& paths)
{
valid_ = true;
@@ -2121,7 +2117,7 @@ namespace XSDFrontend
NamespaceMap cache;
cache_ = &cache;
- Evptr<Schema> rs (new Schema ("", 0, 0));
+ auto_ptr<Schema> rs (new Schema ("", 0, 0));
// Implied schema with fundamental types.
//
@@ -2206,7 +2202,7 @@ namespace XSDFrontend
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
Schema& s (u.schema ());
@@ -2237,19 +2233,19 @@ namespace XSDFrontend
belongs_.node_traverser (d);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Attribute& a)
{
traverse_member (a);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Element& e)
{
traverse_member (e);
}
- virtual Void
+ virtual void
traverse_member (SemanticGraph::Member& m)
{
if (m.typed_p () &&
@@ -2275,7 +2271,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Type& t)
{
if (!t.named_p ())
@@ -2355,11 +2351,11 @@ namespace XSDFrontend
return rs;
}
- Void Parser::Impl::
+ void Parser::Impl::
schema (XML::Element const& s)
{
- Boolean old_qa (qualify_attribute_);
- Boolean old_qe (qualify_element_);
+ bool old_qa (qualify_attribute_);
+ bool old_qe (qualify_element_);
if (String af = trim (s["attributeFormDefault"]))
qualify_attribute_ = af == L"qualified";
@@ -2407,7 +2403,7 @@ namespace XSDFrontend
qualify_element_ = old_qe;
}
- Void Parser::Impl::
+ void Parser::Impl::
import (XML::Element const& i)
{
NarrowString loc (
@@ -2492,7 +2488,7 @@ namespace XSDFrontend
s.context ().set ("absolute-path", abs_path);
Schema* old_cur (cur_);
- Boolean old_cur_chameleon (cur_chameleon_);
+ bool old_cur_chameleon (cur_chameleon_);
cur_ = &s;
cur_chameleon_ = false;
@@ -2521,7 +2517,7 @@ namespace XSDFrontend
}
}
- Void Parser::Impl::
+ void Parser::Impl::
include (XML::Element const& i)
{
NarrowString loc (
@@ -2607,7 +2603,7 @@ namespace XSDFrontend
schema_map_[schema_id] = &s;
s.context ().set ("absolute-path", abs_path);
- Boolean chameleon (false);
+ bool chameleon (false);
if (ns.empty () && !(cur_ns = (cur_->names_begin ())->name ()).empty ())
{
@@ -2627,7 +2623,7 @@ namespace XSDFrontend
wcout << "target namespace: " << ns << endl;
Schema* old_cur (cur_);
- Boolean old_cur_chameleon (cur_chameleon_);
+ bool old_cur_chameleon (cur_chameleon_);
cur_ = &s;
cur_chameleon_ = chameleon;
@@ -2656,8 +2652,8 @@ namespace XSDFrontend
}
}
- Void Parser::Impl::
- element_group (XML::Element const& g, Boolean in_compositor)
+ void Parser::Impl::
+ element_group (XML::Element const& g, bool in_compositor)
{
if (String name = trim (g["name"]))
{
@@ -2721,8 +2717,8 @@ namespace XSDFrontend
{
Compositor& c (compositor ());
- UnsignedLong min (parse_min (trim (g["minOccurs"])));
- UnsignedLong max (parse_max (trim (g["maxOccurs"])));
+ unsigned long min (parse_min (trim (g["minOccurs"])));
+ unsigned long max (parse_max (trim (g["maxOccurs"])));
ElementGroupRef ref (
uq_name, ns_name,
@@ -2744,8 +2740,8 @@ namespace XSDFrontend
Scope& s (scope ());
- UnsignedLong min (parse_min (trim (g["minOccurs"])));
- UnsignedLong max (parse_max (trim (g["maxOccurs"])));
+ unsigned long min (parse_min (trim (g["minOccurs"])));
+ unsigned long max (parse_max (trim (g["maxOccurs"])));
ElementGroupRef ref (
uq_name, ns_name, min, max == unbounded ? 0 : max, s);
@@ -2892,8 +2888,8 @@ namespace XSDFrontend
// Find first non-space character.
//
- Size
- find_ns (const WideChar* s, Size size, Size pos)
+ size_t
+ find_ns (const wchar_t* s, size_t size, size_t pos)
{
while (pos < size &&
(s[pos] == 0x20 || // space
@@ -2907,8 +2903,8 @@ namespace XSDFrontend
// Find first space character.
//
- Size
- find_s (const WideChar* s, Size size, Size pos)
+ size_t
+ find_s (const wchar_t* s, size_t size, size_t pos)
{
while (pos < size &&
s[pos] != 0x20 && // space
@@ -2929,7 +2925,7 @@ namespace XSDFrontend
Union& node (s_->new_node<Union> (file (), t.line (), t.column ()));
- Boolean has_members (false);
+ bool has_members (false);
if (String members = trim (u["memberTypes"]))
{
@@ -2938,17 +2934,17 @@ namespace XSDFrontend
// the late resolutions into specific places. It is simpler
// to just do the whole resolution later.
//
- const WideChar* data (members.c_str ());
- Size size (members.size ());
+ const wchar_t* data (members.c_str ());
+ size_t size (members.size ());
UnionMemberTypes* m (0);
// Traverse the type list while logically collapsing spaces.
//
- for (Size i (find_ns (data, size, 0)); i != String::npos;)
+ for (size_t i (find_ns (data, size, 0)); i != String::npos;)
{
String s;
- Size j (find_s (data, size, i));
+ size_t j (find_s (data, size, i));
if (j != String::npos)
{
@@ -3055,7 +3051,7 @@ namespace XSDFrontend
annotation (false);
- Boolean enum_ (false);
+ bool enum_ (false);
if (!base)
{
@@ -3195,7 +3191,7 @@ namespace XSDFrontend
return rv;
}
- Void Parser::Impl::
+ void Parser::Impl::
enumeration (XML::Element const& e)
{
String value (e["value"]);
@@ -3269,8 +3265,8 @@ namespace XSDFrontend
if (c)
{
- UnsignedLong min (parse_min (trim (e["minOccurs"])));
- UnsignedLong max (parse_max (trim (e["maxOccurs"])));
+ unsigned long min (parse_min (trim (e["minOccurs"])));
+ unsigned long max (parse_max (trim (e["maxOccurs"])));
if (!(min == 0 && max == 0))
s_->new_edge<ContainsCompositor> (
@@ -3340,14 +3336,14 @@ namespace XSDFrontend
}
Choice* Parser::Impl::
- choice (XML::Element const& c, Boolean in_compositor)
+ choice (XML::Element const& c, bool in_compositor)
{
Choice& node (s_->new_node<Choice> (file (), c.line (), c.column ()));
if (in_compositor)
{
- UnsignedLong min (parse_min (trim (c["minOccurs"])));
- UnsignedLong max (parse_max (trim (c["maxOccurs"])));
+ unsigned long min (parse_min (trim (c["minOccurs"])));
+ unsigned long max (parse_max (trim (c["maxOccurs"])));
if (!(min == 0 && max == 0))
s_->new_edge<ContainsParticle> (
@@ -3387,14 +3383,14 @@ namespace XSDFrontend
}
Sequence* Parser::Impl::
- sequence (XML::Element const& s, Boolean in_compositor)
+ sequence (XML::Element const& s, bool in_compositor)
{
Sequence& node (s_->new_node<Sequence> (file (), s.line (), s.column ()));
if (in_compositor)
{
- UnsignedLong min (parse_min (trim (s["minOccurs"])));
- UnsignedLong max (parse_max (trim (s["maxOccurs"])));
+ unsigned long min (parse_min (trim (s["minOccurs"])));
+ unsigned long max (parse_max (trim (s["maxOccurs"])));
if (!(min == 0 && max == 0))
s_->new_edge<ContainsParticle> (
@@ -3433,7 +3429,7 @@ namespace XSDFrontend
return &node;
}
- Void Parser::Impl::
+ void Parser::Impl::
simple_content (XML::Element const& c)
{
push (c);
@@ -3456,7 +3452,7 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
+ void Parser::Impl::
complex_content (XML::Element const& c, Complex& type)
{
if (String m = trim (c["mixed"]))
@@ -3482,7 +3478,7 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
+ void Parser::Impl::
simple_content_extension (XML::Element const& e)
{
if (trace_)
@@ -3514,7 +3510,7 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
+ void Parser::Impl::
simple_content_restriction (XML::Element const& r)
{
String base (trim (r["base"]));
@@ -3652,7 +3648,7 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
+ void Parser::Impl::
complex_content_extension (XML::Element const& e, Complex& type)
{
if (trace_)
@@ -3686,8 +3682,8 @@ namespace XSDFrontend
if (c)
{
- UnsignedLong min (parse_min (trim (e["minOccurs"])));
- UnsignedLong max (parse_max (trim (e["maxOccurs"])));
+ unsigned long min (parse_min (trim (e["minOccurs"])));
+ unsigned long max (parse_max (trim (e["maxOccurs"])));
if (!(min == 0 && max == 0))
s_->new_edge<ContainsCompositor> (
@@ -3715,7 +3711,7 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
+ void Parser::Impl::
complex_content_restriction (XML::Element const& e, Complex& type)
{
if (trace_)
@@ -3769,8 +3765,8 @@ namespace XSDFrontend
if (c)
{
- UnsignedLong min (parse_min (trim (e["minOccurs"])));
- UnsignedLong max (parse_max (trim (e["maxOccurs"])));
+ unsigned long min (parse_min (trim (e["minOccurs"])));
+ unsigned long max (parse_max (trim (e["maxOccurs"])));
if (!(min == 0 && max == 0))
s_->new_edge<ContainsCompositor> (
@@ -3798,10 +3794,10 @@ namespace XSDFrontend
pop ();
}
- Void Parser::Impl::
- element (XML::Element const& e, Boolean global)
+ void Parser::Impl::
+ element (XML::Element const& e, bool global)
{
- Boolean qualified (global ? true : qualify_element_);
+ bool qualified (global ? true : qualify_element_);
if (String form = trim (e["form"]))
qualified = form == L"qualified";
@@ -3820,8 +3816,8 @@ namespace XSDFrontend
if (!global)
{
- UnsignedLong min (parse_min (trim (e["minOccurs"])));
- UnsignedLong max (parse_max (trim (e["maxOccurs"])));
+ unsigned long min (parse_min (trim (e["minOccurs"])));
+ unsigned long max (parse_max (trim (e["maxOccurs"])));
if (!(min == 0 && max == 0))
{
@@ -3955,8 +3951,8 @@ namespace XSDFrontend
s_->new_node<Element> (
file (), e.line (), e.column (), true, true));
- UnsignedLong min (parse_min (trim (e["minOccurs"])));
- UnsignedLong max (parse_max (trim (e["maxOccurs"])));
+ unsigned long min (parse_min (trim (e["minOccurs"])));
+ unsigned long max (parse_max (trim (e["maxOccurs"])));
// Default and fixed values are mutually exclusive.
//
@@ -4114,7 +4110,7 @@ namespace XSDFrontend
}
SemanticGraph::Annotation* Parser::Impl::
- annotation (Boolean process)
+ annotation (bool process)
{
Annotation* r (0);
@@ -4141,7 +4137,7 @@ namespace XSDFrontend
// Use first non-structured (text only) documentation element.
//
String text;
- Boolean struc (false);
+ bool struc (false);
DOMElement* de (doc.dom_element());
for (DOMNode* n (de->getFirstChild ());
@@ -4187,10 +4183,10 @@ namespace XSDFrontend
}
- Void Parser::Impl::
- attribute (XML::Element const& a, Boolean global)
+ void Parser::Impl::
+ attribute (XML::Element const& a, bool global)
{
- Boolean optional (true);
+ bool optional (true);
String use (trim (a["use"]));
@@ -4199,7 +4195,7 @@ namespace XSDFrontend
else if (use == L"required")
optional = false;
- Boolean qualified (global ? true : qualify_attribute_);
+ bool qualified (global ? true : qualify_attribute_);
if (String form = trim (a["form"]))
qualified = form == L"qualified";
@@ -4444,7 +4440,7 @@ namespace XSDFrontend
}
}
- Void Parser::Impl::
+ void Parser::Impl::
attribute_group (XML::Element const& g)
{
if (String name = trim (g["name"]))
@@ -4543,7 +4539,7 @@ namespace XSDFrontend
}
}
- Void Parser::Impl::
+ void Parser::Impl::
any (XML::Element const& a)
{
if (trace_)
@@ -4557,8 +4553,8 @@ namespace XSDFrontend
Any& any (
s_->new_node<Any> (file (), a.line (), a.column (), namespaces));
- UnsignedLong min (parse_min (trim (a["minOccurs"])));
- UnsignedLong max (parse_max (trim (a["maxOccurs"])));
+ unsigned long min (parse_min (trim (a["minOccurs"])));
+ unsigned long max (parse_max (trim (a["maxOccurs"])));
// Parse annotation.
//
@@ -4577,7 +4573,7 @@ namespace XSDFrontend
// Any has no name so we have to come up with a fake one in order to
// put it into the scope.
//
- UnsignedLong count;
+ unsigned long count;
SemanticGraph::Context& ctx (scope ().context ());
if (!ctx.count ("any-name-count"))
@@ -4586,16 +4582,16 @@ namespace XSDFrontend
ctx.set ("any-name-count", count);
}
else
- count = ++(ctx.get<UnsignedLong> ("any-name-count"));
+ count = ++(ctx.get<unsigned long> ("any-name-count"));
- std::basic_ostringstream<WideChar> os;
+ std::basic_ostringstream<wchar_t> os;
os << "any #" << count;
s_->new_edge<Names> (scope (), any, os.str ());
}
}
- Void Parser::Impl::
+ void Parser::Impl::
any_attribute (XML::Element const& a)
{
if (trace_)
@@ -4623,7 +4619,7 @@ namespace XSDFrontend
// in order to put it into the scope.
//
- UnsignedLong count;
+ unsigned long count;
SemanticGraph::Context& ctx (scope ().context ());
if (!ctx.count ("any-attribute-name-count"))
@@ -4632,9 +4628,9 @@ namespace XSDFrontend
ctx.set ("any-attribute-name-count", count);
}
else
- count = ++(ctx.get<UnsignedLong> ("any-attribute-name-count"));
+ count = ++(ctx.get<unsigned long> ("any-attribute-name-count"));
- std::basic_ostringstream<WideChar> os;
+ std::basic_ostringstream<wchar_t> os;
os << "any-attribute #" << count;
s_->new_edge<Names> (scope (), any, os.str ());
@@ -4773,7 +4769,7 @@ namespace XSDFrontend
}
}
- Void
+ void
map_file (Path const& abs, Path const& rel)
{
file_map_[abs] = rel;
@@ -4789,13 +4785,13 @@ namespace XSDFrontend
class ErrorHandler : public Xerces::DOMErrorHandler
{
public:
- ErrorHandler (Boolean& valid, XSDFrontend::Context const& ctx)
+ ErrorHandler (bool& valid, XSDFrontend::Context const& ctx)
: valid_ (valid),
ctx_ (ctx)
{
}
- virtual Boolean
+ virtual bool
handleError (Xerces::DOMError const& e)
{
// Xerces likes to say "Fatal error encountered during schema scan".
@@ -4838,7 +4834,7 @@ namespace XSDFrontend
}
private:
- Boolean& valid_;
+ bool& valid_;
XSDFrontend::Context const& ctx_;
};
@@ -5023,7 +5019,7 @@ namespace XSDFrontend
XML::AutoPtr<Xerces::DOMDocument> Parser::Impl::
- dom (Path const& tu, Boolean validate)
+ dom (Path const& tu, bool validate)
{
using namespace Xerces;
@@ -5133,7 +5129,7 @@ namespace XSDFrontend
}
catch (Xerces::DOMException const& e)
{
- Size const size = 2047;
+ size_t const size = 2047;
XMLCh text[size + 1];
wcerr << tu << ": ice: Xerces::DOMException: ";
@@ -5176,9 +5172,9 @@ namespace XSDFrontend
}
Parser::
- Parser (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check)
+ Parser (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check)
: impl_ (new Impl (proper_restriction,
multiple_imports,
full_schema_check,
@@ -5188,9 +5184,9 @@ namespace XSDFrontend
}
Parser::
- Parser (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check,
+ Parser (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check,
LocationTranslator& t,
const WarningSet& d)
: impl_ (new Impl (proper_restriction,
@@ -5201,19 +5197,19 @@ namespace XSDFrontend
{
}
- Evptr<SemanticGraph::Schema> Parser::
+ auto_ptr<SemanticGraph::Schema> Parser::
parse (SemanticGraph::Path const& path)
{
return impl_->parse (path);
}
- Evptr<SemanticGraph::Schema> Parser::
+ auto_ptr<SemanticGraph::Schema> Parser::
parse (SemanticGraph::Paths const& paths)
{
return impl_->parse (paths);
}
- Evptr<SemanticGraph::Schema> Parser::
+ auto_ptr<SemanticGraph::Schema> Parser::
xml_schema (SemanticGraph::Path const& path)
{
return impl_->xml_schema (path);
diff --git a/xsd-frontend/parser.hxx b/xsd-frontend/parser.hxx
index 3e76285..2efb75f 100644
--- a/xsd-frontend/parser.hxx
+++ b/xsd-frontend/parser.hxx
@@ -7,6 +7,7 @@
#define XSD_FRONTEND_PARSER_HXX
#include <set>
+#include <memory> // std::auto_ptr
#include <cult/types.hxx>
@@ -38,39 +39,39 @@ namespace XSDFrontend
public:
~Parser ();
- Parser (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check);
+ Parser (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check);
- Parser (Boolean proper_restriction,
- Boolean multiple_imports,
- Boolean full_schema_check,
+ Parser (bool proper_restriction,
+ bool multiple_imports,
+ bool full_schema_check,
LocationTranslator&,
const WarningSet& disabled);
public:
// Parse a schema file. Throws InvalidSchema in case of a failure.
//
- Evptr<SemanticGraph::Schema>
+ std::auto_ptr<SemanticGraph::Schema>
parse (SemanticGraph::Path const&);
// Parse a number of schema files all into one semantic graph.
// Each schema file is imported from an unnamed root translation
// unit. Throws InvalidSchema in case of a failure.
//
- Evptr<SemanticGraph::Schema>
+ std::auto_ptr<SemanticGraph::Schema>
parse (SemanticGraph::Paths const&);
// Returns a schema graph that corresponds to the XML Schema
// namespace with built-in type definitions. The path is fake
// and is only used as a lable.
//
- Evptr<SemanticGraph::Schema>
+ std::auto_ptr<SemanticGraph::Schema>
xml_schema (SemanticGraph::Path const&);
private:
class Impl;
- Evptr<Impl> impl_;
+ std::auto_ptr<Impl> impl_;
};
}
diff --git a/xsd-frontend/semantic-graph/annotation.hxx b/xsd-frontend/semantic-graph/annotation.hxx
index c6e5dfc..3d6f098 100644
--- a/xsd-frontend/semantic-graph/annotation.hxx
+++ b/xsd-frontend/semantic-graph/annotation.hxx
@@ -28,16 +28,16 @@ namespace XSDFrontend
public:
Annotates (): annotation_ (0) {}
- Void
+ void
set_left_node (Annotation& a)
{
annotation_ = &a;
}
- Void
+ void
set_right_node (Node&) {}
- Void
+ void
set_right_node (Edge&) {}
private:
@@ -57,14 +57,14 @@ namespace XSDFrontend
public:
Annotation (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
WideString const& documentation)
: Node (file, line, column), documentation_ (documentation)
{
}
- Void
+ void
add_edge_left (Annotates&) {}
private:
diff --git a/xsd-frontend/semantic-graph/any-attribute.cxx b/xsd-frontend/semantic-graph/any-attribute.cxx
index 3177f80..8a8660c 100644
--- a/xsd-frontend/semantic-graph/any-attribute.cxx
+++ b/xsd-frontend/semantic-graph/any-attribute.cxx
@@ -14,8 +14,8 @@ namespace XSDFrontend
{
AnyAttribute::
AnyAttribute (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
WideString const& namespaces)
: Node (file, line, column),
prototype_ (0)
@@ -24,7 +24,7 @@ namespace XSDFrontend
// chararcter.
//
- for (Size i (0), j (namespaces.find (L' '));;)
+ for (size_t i (0), j (namespaces.find (L' '));;)
{
if (j != WideString::npos)
{
@@ -45,8 +45,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),
diff --git a/xsd-frontend/semantic-graph/any-attribute.hxx b/xsd-frontend/semantic-graph/any-attribute.hxx
index be06a83..8827987 100644
--- a/xsd-frontend/semantic-graph/any-attribute.hxx
+++ b/xsd-frontend/semantic-graph/any-attribute.hxx
@@ -35,7 +35,7 @@ namespace XSDFrontend
}
public:
- Boolean
+ bool
prototype_p ()
{
return prototype_ != 0;
@@ -48,7 +48,7 @@ namespace XSDFrontend
return *prototype_;
}
- Void
+ void
prototype (AnyAttribute& a)
{
assert (prototype_ == 0);
@@ -61,13 +61,13 @@ namespace XSDFrontend
public:
AnyAttribute (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
WideString const& namespaces);
AnyAttribute (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
NamespaceIterator begin,
NamespaceIterator end);
diff --git a/xsd-frontend/semantic-graph/any.cxx b/xsd-frontend/semantic-graph/any.cxx
index 02f4199..75eb5dd 100644
--- a/xsd-frontend/semantic-graph/any.cxx
+++ b/xsd-frontend/semantic-graph/any.cxx
@@ -14,8 +14,8 @@ namespace XSDFrontend
{
Any::
Any (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
WideString const& namespaces)
: Node (file, line, column),
prototype_ (0)
@@ -24,7 +24,7 @@ namespace XSDFrontend
// chararcter.
//
- for (Size i (0), j (namespaces.find (L' '));;)
+ for (size_t i (0), j (namespaces.find (L' '));;)
{
if (j != WideString::npos)
{
@@ -45,8 +45,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),
diff --git a/xsd-frontend/semantic-graph/any.hxx b/xsd-frontend/semantic-graph/any.hxx
index fce77a4..b0506d0 100644
--- a/xsd-frontend/semantic-graph/any.hxx
+++ b/xsd-frontend/semantic-graph/any.hxx
@@ -37,7 +37,7 @@ namespace XSDFrontend
}
public:
- Boolean
+ bool
prototype_p ()
{
return prototype_ != 0;
@@ -50,7 +50,7 @@ namespace XSDFrontend
return *prototype_;
}
- Void
+ void
prototype (Any& a)
{
assert (prototype_ == 0);
@@ -63,13 +63,13 @@ namespace XSDFrontend
public:
Any (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
WideString const& namespaces);
Any (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
+ unsigned long line,
+ unsigned long column,
NamespaceIterator begin,
NamespaceIterator end);
diff --git a/xsd-frontend/semantic-graph/attribute-group.cxx b/xsd-frontend/semantic-graph/attribute-group.cxx
index d966cea..71d4046 100644
--- a/xsd-frontend/semantic-graph/attribute-group.cxx
+++ b/xsd-frontend/semantic-graph/attribute-group.cxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
namespace SemanticGraph
{
AttributeGroup::
- AttributeGroup (Path const& file, UnsignedLong line, UnsignedLong column)
+ AttributeGroup (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/attribute-group.hxx b/xsd-frontend/semantic-graph/attribute-group.hxx
index a202ae0..003bbd8 100644
--- a/xsd-frontend/semantic-graph/attribute-group.hxx
+++ b/xsd-frontend/semantic-graph/attribute-group.hxx
@@ -16,8 +16,8 @@ namespace XSDFrontend
{
public:
AttributeGroup (Path const& file,
- UnsignedLong line,
- UnsignedLong column);
+ unsigned long line,
+ unsigned long column);
};
}
}
diff --git a/xsd-frontend/semantic-graph/attribute.cxx b/xsd-frontend/semantic-graph/attribute.cxx
index 794832c..f8ff184 100644
--- a/xsd-frontend/semantic-graph/attribute.cxx
+++ b/xsd-frontend/semantic-graph/attribute.cxx
@@ -13,11 +13,11 @@ namespace XSDFrontend
{
Attribute::
Attribute (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
- Boolean optional,
- Boolean global,
- Boolean qualified)
+ unsigned long line,
+ unsigned long column,
+ bool optional,
+ bool global,
+ bool qualified)
: Node (file, line, column),
Member (global, qualified),
optional_ (optional)
diff --git a/xsd-frontend/semantic-graph/attribute.hxx b/xsd-frontend/semantic-graph/attribute.hxx
index 49c2019..965589d 100644
--- a/xsd-frontend/semantic-graph/attribute.hxx
+++ b/xsd-frontend/semantic-graph/attribute.hxx
@@ -15,7 +15,7 @@ namespace XSDFrontend
class Attribute: public virtual Member
{
public:
- Boolean
+ bool
optional_p () const
{
return optional_;
@@ -23,13 +23,13 @@ namespace XSDFrontend
public:
Attribute (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
- Boolean optional,
- Boolean global,
- Boolean qualified);
+ unsigned long line,
+ unsigned long column,
+ bool optional,
+ bool global,
+ bool qualified);
private:
- Boolean optional_;
+ bool optional_;
};
}
}
diff --git a/xsd-frontend/semantic-graph/complex.cxx b/xsd-frontend/semantic-graph/complex.cxx
index f17f12c..3793c07 100644
--- a/xsd-frontend/semantic-graph/complex.cxx
+++ b/xsd-frontend/semantic-graph/complex.cxx
@@ -18,7 +18,7 @@ namespace XSDFrontend
}
Complex::
- Complex (Path const& file, UnsignedLong line, UnsignedLong column)
+ Complex (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column),
mixed_ (false), contains_compositor_ (0)
{
diff --git a/xsd-frontend/semantic-graph/complex.hxx b/xsd-frontend/semantic-graph/complex.hxx
index 106a549..008c5bd 100644
--- a/xsd-frontend/semantic-graph/complex.hxx
+++ b/xsd-frontend/semantic-graph/complex.hxx
@@ -16,14 +16,14 @@ namespace XSDFrontend
class Complex: public virtual Type, public virtual Scope
{
public:
- Boolean
+ bool
mixed_p () const
{
return mixed_;
}
public:
- Boolean
+ bool
contains_compositor_p ()
{
return contains_compositor_ != 0;
@@ -37,22 +37,22 @@ namespace XSDFrontend
}
public:
- Void
- mixed_p (Boolean m)
+ void
+ mixed_p (bool m)
{
mixed_ = m;
}
public:
- Complex (Path const& file, UnsignedLong line, UnsignedLong column);
+ Complex (Path const& file, unsigned long line, unsigned long column);
- Void
+ void
add_edge_left (ContainsCompositor& e)
{
contains_compositor_ = &e;
}
- Void
+ void
remove_edge_left (ContainsCompositor& e)
{
assert (contains_compositor_ == &e);
@@ -67,7 +67,7 @@ namespace XSDFrontend
Complex (); // For virtual inheritance (Enumeration).
private:
- Boolean mixed_;
+ bool mixed_;
ContainsCompositor* contains_compositor_;
};
}
diff --git a/xsd-frontend/semantic-graph/compositors.cxx b/xsd-frontend/semantic-graph/compositors.cxx
index 8eaa5cf..60ba2aa 100644
--- a/xsd-frontend/semantic-graph/compositors.cxx
+++ b/xsd-frontend/semantic-graph/compositors.cxx
@@ -14,7 +14,7 @@ namespace XSDFrontend
// ContainsCompositor
//
ContainsCompositor::
- ContainsCompositor (UnsignedLong min, UnsignedLong max)
+ ContainsCompositor (unsigned long min, unsigned long max)
: compositor_ (0), container_ (0), min_ (min), max_ (max)
{
}
@@ -22,7 +22,7 @@ namespace XSDFrontend
// All
//
All::
- All (Path const& file, UnsignedLong line, UnsignedLong column)
+ All (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
@@ -30,7 +30,7 @@ namespace XSDFrontend
// Choice
//
Choice::
- Choice (Path const& file, UnsignedLong line, UnsignedLong column)
+ Choice (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
@@ -38,7 +38,7 @@ namespace XSDFrontend
// Sequence
//
Sequence::
- Sequence (Path const& file, UnsignedLong line, UnsignedLong column)
+ Sequence (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/compositors.hxx b/xsd-frontend/semantic-graph/compositors.hxx
index f7aed8f..78f5352 100644
--- a/xsd-frontend/semantic-graph/compositors.hxx
+++ b/xsd-frontend/semantic-graph/compositors.hxx
@@ -33,41 +33,41 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
return min_;
}
- UnsignedLong
+ unsigned long
max () const
{
return max_;
}
public:
- ContainsCompositor (UnsignedLong min, UnsignedLong max);
+ ContainsCompositor (unsigned long min, unsigned long max);
- Void
+ void
set_left_node (Node& n)
{
container_ = &n;
}
- Void
+ void
set_right_node (Compositor& n)
{
compositor_ = &n;
}
- Void
+ void
clear_left_node (Node& n)
{
assert (container_ == &n);
container_ = 0;
}
- Void
+ void
clear_right_node (Compositor& n)
{
assert (compositor_ == &n);
@@ -77,7 +77,7 @@ namespace XSDFrontend
private:
Compositor* compositor_;
Node* container_;
- UnsignedLong min_, max_;
+ unsigned long min_, max_;
};
//
@@ -117,7 +117,7 @@ namespace XSDFrontend
}
public:
- Boolean
+ bool
contained_compositor_p ()
{
return contained_compositor_ != 0;
@@ -131,7 +131,7 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
if (contained_compositor_ != 0)
@@ -140,7 +140,7 @@ namespace XSDFrontend
return Particle::min ();
}
- UnsignedLong
+ unsigned long
max () const
{
if (contained_compositor_ != 0)
@@ -152,13 +152,13 @@ namespace XSDFrontend
public:
Compositor (): contained_compositor_ (0) {}
- Void
+ void
add_edge_left (ContainsParticle& e)
{
contains_.push_back (&e);
}
- Void
+ void
add_edge_left (ContainsParticle& e, ContainsIterator const& after)
{
if (after.base () == contains_.end ())
@@ -170,7 +170,7 @@ namespace XSDFrontend
}
}
- Void
+ void
remove_edge_left (ContainsParticle& e)
{
for (ContainsList::iterator i (contains_.begin ());
@@ -184,13 +184,13 @@ namespace XSDFrontend
}
}
- Void
+ void
add_edge_right (ContainsCompositor& e)
{
contained_compositor_ = &e;
}
- Void
+ void
remove_edge_right (ContainsCompositor& e)
{
assert (contained_compositor_ == &e);
@@ -211,7 +211,7 @@ namespace XSDFrontend
class All: public virtual Compositor
{
public:
- All (Path const& file, UnsignedLong line, UnsignedLong column);
+ All (Path const& file, unsigned long line, unsigned long column);
};
//
@@ -219,7 +219,7 @@ namespace XSDFrontend
class Choice: public virtual Compositor
{
public:
- Choice (Path const& file, UnsignedLong line, UnsignedLong column);
+ Choice (Path const& file, unsigned long line, unsigned long column);
};
//
@@ -227,7 +227,7 @@ namespace XSDFrontend
class Sequence: public virtual Compositor
{
public:
- Sequence (Path const& file, UnsignedLong line, UnsignedLong column);
+ Sequence (Path const& file, unsigned long line, unsigned long column);
};
}
}
diff --git a/xsd-frontend/semantic-graph/element-group.cxx b/xsd-frontend/semantic-graph/element-group.cxx
index 2e42757..01bc604 100644
--- a/xsd-frontend/semantic-graph/element-group.cxx
+++ b/xsd-frontend/semantic-graph/element-group.cxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
namespace SemanticGraph
{
ElementGroup::
- ElementGroup (Path const& file, UnsignedLong line, UnsignedLong column)
+ ElementGroup (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column), contains_compositor_ (0)
{
}
diff --git a/xsd-frontend/semantic-graph/element-group.hxx b/xsd-frontend/semantic-graph/element-group.hxx
index 8de3336..34b4803 100644
--- a/xsd-frontend/semantic-graph/element-group.hxx
+++ b/xsd-frontend/semantic-graph/element-group.hxx
@@ -24,9 +24,9 @@ namespace XSDFrontend
}
public:
- ElementGroup (Path const& file, UnsignedLong line, UnsignedLong column);
+ ElementGroup (Path const& file, unsigned long line, unsigned long column);
- Void
+ void
add_edge_left (ContainsCompositor& e)
{
contains_compositor_ = &e;
diff --git a/xsd-frontend/semantic-graph/element.cxx b/xsd-frontend/semantic-graph/element.cxx
index 607fd2c..f60bc2e 100644
--- a/xsd-frontend/semantic-graph/element.cxx
+++ b/xsd-frontend/semantic-graph/element.cxx
@@ -15,10 +15,10 @@ namespace XSDFrontend
//
Element::
Element (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
- Boolean global,
- Boolean qualified)
+ unsigned long line,
+ unsigned long column,
+ bool global,
+ bool qualified)
: Node (file, line, column),
Member (global, qualified),
substitutes_ (0)
diff --git a/xsd-frontend/semantic-graph/element.hxx b/xsd-frontend/semantic-graph/element.hxx
index 425ddce..57a27c6 100644
--- a/xsd-frontend/semantic-graph/element.hxx
+++ b/xsd-frontend/semantic-graph/element.hxx
@@ -31,13 +31,13 @@ namespace XSDFrontend
}
public:
- Void
+ void
set_left_node (Element& n)
{
substitution_ = &n;
}
- Void
+ void
set_right_node (Element& n)
{
root_ = &n;
@@ -53,7 +53,7 @@ namespace XSDFrontend
public virtual Particle
{
public:
- Boolean
+ bool
substitutes_p () const
{
return substitutes_ != 0;
@@ -68,18 +68,18 @@ namespace XSDFrontend
public:
Element (Path const& file,
- UnsignedLong line,
- UnsignedLong column,
- Boolean global,
- Boolean qualified);
+ unsigned long line,
+ unsigned long column,
+ bool global,
+ bool qualified);
- Void
+ void
add_edge_left (Substitutes& e)
{
substitutes_ = &e;
}
- Void
+ void
add_edge_right (Substitutes&) {}
using Member::add_edge_left;
diff --git a/xsd-frontend/semantic-graph/elements.cxx b/xsd-frontend/semantic-graph/elements.cxx
index 4a4e30c..28cfe4d 100644
--- a/xsd-frontend/semantic-graph/elements.cxx
+++ b/xsd-frontend/semantic-graph/elements.cxx
@@ -26,7 +26,7 @@ namespace XSDFrontend
// Type
//
- Void Type::
+ void Type::
remove_edge_left (Arguments& a)
{
ArgumentsSet::iterator i (arguments_.find (&a));
@@ -36,7 +36,7 @@ namespace XSDFrontend
// Specialization
//
- Void Specialization::
+ void Specialization::
remove_edge_right (Arguments& a)
{
// The number of entries should be small so linear search will do.
diff --git a/xsd-frontend/semantic-graph/elements.hxx b/xsd-frontend/semantic-graph/elements.hxx
index 2b9ce06..ad70221 100644
--- a/xsd-frontend/semantic-graph/elements.hxx
+++ b/xsd-frontend/semantic-graph/elements.hxx
@@ -69,7 +69,7 @@ namespace XSDFrontend
public:
template <typename X>
- Boolean
+ bool
is_a () const
{
return dynamic_cast<X const*> (this) != 0;
@@ -79,7 +79,7 @@ namespace XSDFrontend
mutable Context context_;
};
- inline Boolean
+ inline bool
operator== (Edge const& x, Edge const& y)
{
return &x == &y;
@@ -104,20 +104,20 @@ namespace XSDFrontend
return file_;
}
- UnsignedLong
+ unsigned long
line () const
{
return line_;
}
- UnsignedLong
+ unsigned long
column () const
{
return column_;
}
public:
- Boolean
+ bool
annotated_p () const
{
return annotates_ != 0;
@@ -134,7 +134,7 @@ namespace XSDFrontend
public:
template <typename X>
- Boolean
+ bool
is_a () const
{
return dynamic_cast<X const*> (this) != 0;
@@ -144,12 +144,12 @@ namespace XSDFrontend
virtual
~Node () {}
- Node (Path const& file, UnsignedLong line, UnsignedLong column)
+ Node (Path const& file, unsigned long line, unsigned long column)
: annotates_ (0), file_ (file), line_ (line), column_ (column)
{
}
- Void
+ void
add_edge_right (Annotates& a)
{
annotates_ = &a;
@@ -165,11 +165,11 @@ namespace XSDFrontend
mutable Context context_;
Annotates* annotates_;
Path file_;
- UnsignedLong line_;
- UnsignedLong column_;
+ unsigned long line_;
+ unsigned long column_;
};
- inline Boolean
+ inline bool
operator== (Node const& x, Node const& y)
{
return &x == &y;
@@ -216,26 +216,26 @@ namespace XSDFrontend
public:
Names (Name const& name): name_ (name) {}
- Void
+ void
set_left_node (Scope& n)
{
scope_ = &n;
}
- Void
+ void
set_right_node (Nameable& n)
{
named_ = &n;
}
- Void
+ void
clear_left_node (Scope& n)
{
assert (scope_ == &n);
scope_ = 0;
}
- Void
+ void
clear_right_node (Nameable& n)
{
assert (named_ == &n);
@@ -252,7 +252,7 @@ namespace XSDFrontend
class Nameable: public virtual Node
{
public:
- Boolean
+ bool
named_p () const
{
return named_ != 0;
@@ -282,13 +282,13 @@ namespace XSDFrontend
public:
Nameable (): named_ (0) {}
- Void
+ void
add_edge_right (Names& e)
{
named_ = &e;
}
- Void
+ void
remove_edge_right (Names& e)
{
assert (named_ == &e);
@@ -365,12 +365,12 @@ namespace XSDFrontend
}
public:
- Scope (Path const& file, UnsignedLong line, UnsignedLong column)
+ Scope (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
- Void
+ void
add_edge_left (Names& e)
{
NamesList::iterator i (names_.insert (names_.end (), &e));
@@ -378,7 +378,7 @@ namespace XSDFrontend
names_map_[e.name ()].push_back (&e);
}
- Void
+ void
remove_edge_left (Names& e)
{
ListIteratorMap::iterator i (iterator_map_.find (&e));
@@ -397,7 +397,7 @@ namespace XSDFrontend
}
}
- Void
+ void
add_edge_left (Names& e, NamesIterator const& after)
{
NamesList::iterator i;
@@ -456,7 +456,7 @@ namespace XSDFrontend
//
//
- Boolean
+ bool
inherits_p () const
{
return inherits_ != 0;
@@ -504,13 +504,13 @@ namespace XSDFrontend
public:
Type (): inherits_ (0) {}
- Void
+ void
add_edge_right (Belongs& e)
{
classifies_.push_back (&e);
}
- Void
+ void
add_edge_right (Inherits& e)
{
begets_.push_back (&e);
@@ -518,16 +518,16 @@ namespace XSDFrontend
using Nameable::add_edge_right;
- Void
+ void
add_edge_left (Arguments& a)
{
arguments_.insert (&a);
}
- Void
+ void
remove_edge_left (Arguments&);
- Void
+ void
add_edge_left (Inherits& e)
{
inherits_ = &e;
@@ -552,7 +552,7 @@ namespace XSDFrontend
Type&
type () const;
- Boolean
+ bool
typed_p () const
{
return belongs_ != 0;
@@ -561,7 +561,7 @@ namespace XSDFrontend
public:
Instance (): belongs_ (0) {}
- Void
+ void
add_edge_left (Belongs& e)
{
belongs_ = &e;
@@ -588,13 +588,13 @@ namespace XSDFrontend
}
public:
- Void
+ void
set_left_node (Instance& n)
{
instance_ = &n;
}
- Void
+ void
set_right_node (Type& n)
{
type_ = &n;
@@ -624,13 +624,13 @@ namespace XSDFrontend
}
public:
- Void
+ void
set_left_node (Type& n)
{
derived_ = &n;
}
- Void
+ void
set_right_node (Type& n)
{
base_ = &n;
@@ -651,7 +651,7 @@ namespace XSDFrontend
typedef std::map<WideString, WideString> Facets;
typedef Facets::iterator FacetIterator;
- Boolean
+ bool
facet_empty ()
{
return facets_.empty ();
@@ -675,7 +675,7 @@ namespace XSDFrontend
return facets_.find (name);
}
- Void
+ void
facet_insert (String const& name, String const& value)
{
facets_[name] = value;
@@ -717,13 +717,13 @@ namespace XSDFrontend
public:
BelongsToNamespace (): member_ (0), namespace__ (0) {}
- Void
+ void
set_left_node (Member& n)
{
member_ = &n;
}
- Void
+ void
set_right_node (Namespace& n)
{
namespace__ = &n;
@@ -742,13 +742,13 @@ namespace XSDFrontend
// Member is global either if it is defined outside any type
// or it is a ref="" of a global member.
//
- Boolean
+ bool
global_p () const
{
return global_;
}
- Boolean
+ bool
qualified_p () const
{
return qualified_;
@@ -768,13 +768,13 @@ namespace XSDFrontend
// is a superset of the default value semantics. As such setting the
// fixed value appears as if the default value was also set.
//
- Boolean
+ bool
default_p () const
{
return value_type_ != ValueType::none;
}
- Boolean
+ bool
fixed_p () const
{
return value_type_ == ValueType::fixed;
@@ -793,14 +793,14 @@ namespace XSDFrontend
//
//
- Void
+ void
default_ (WideString const& v)
{
value_ = v;
value_type_ = ValueType::default_;
}
- Void
+ void
fixed (WideString const& v)
{
value_ = v;
@@ -808,7 +808,7 @@ namespace XSDFrontend
}
public:
- Member (Boolean global, Boolean qualified)
+ Member (bool global, bool qualified)
: global_ (global),
qualified_ (qualified),
belongs_to_namespace_ (0),
@@ -816,7 +816,7 @@ namespace XSDFrontend
{
}
- Void
+ void
add_edge_left (BelongsToNamespace& e)
{
// In the parser we sometimes re-add the same adge.
@@ -827,8 +827,8 @@ namespace XSDFrontend
using Instance::add_edge_left;
private:
- Boolean global_;
- Boolean qualified_;
+ bool global_;
+ bool qualified_;
BelongsToNamespace* belongs_to_namespace_;
struct ValueType
@@ -894,19 +894,19 @@ namespace XSDFrontend
public:
using Type::add_edge_right;
- Void
+ void
add_edge_right (Arguments& a)
{
argumented_.push_back (&a);
}
- Void
+ void
add_edge_right (Arguments& a, ArgumentedIterator const& pos)
{
argumented_.insert (pos.base (), &a);
}
- Void
+ void
remove_edge_right (Arguments&);
private:
@@ -966,7 +966,7 @@ namespace XSDFrontend
class AnyType: public virtual Type
{
public:
- AnyType (Path const& file, UnsignedLong line, UnsignedLong column)
+ AnyType (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
@@ -981,7 +981,7 @@ namespace XSDFrontend
class AnySimpleType: public virtual Type
{
public:
- AnySimpleType (Path const& file, UnsignedLong line, UnsignedLong column)
+ AnySimpleType (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/enumeration.cxx b/xsd-frontend/semantic-graph/enumeration.cxx
index adb9704..5be646f 100644
--- a/xsd-frontend/semantic-graph/enumeration.cxx
+++ b/xsd-frontend/semantic-graph/enumeration.cxx
@@ -14,7 +14,7 @@ namespace XSDFrontend
// Enumeration
//
Enumeration::
- Enumeration (Path const& file, UnsignedLong line, UnsignedLong column)
+ Enumeration (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
@@ -22,7 +22,7 @@ namespace XSDFrontend
// Enumerator
//
Enumerator::
- Enumerator (Path const& file, UnsignedLong line, UnsignedLong column)
+ Enumerator (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/enumeration.hxx b/xsd-frontend/semantic-graph/enumeration.hxx
index ca00c07..d9a956b 100644
--- a/xsd-frontend/semantic-graph/enumeration.hxx
+++ b/xsd-frontend/semantic-graph/enumeration.hxx
@@ -16,14 +16,14 @@ namespace XSDFrontend
class Enumeration: public virtual Complex
{
public:
- Enumeration (Path const& file, UnsignedLong line, UnsignedLong column);
+ Enumeration (Path const& file, unsigned long line, unsigned long column);
};
class Enumerator: public virtual Instance
{
public:
- Enumerator (Path const& file, UnsignedLong line, UnsignedLong column);
+ Enumerator (Path const& file, unsigned long line, unsigned long column);
};
}
}
diff --git a/xsd-frontend/semantic-graph/fundamental.cxx.m4 b/xsd-frontend/semantic-graph/fundamental.cxx.m4
index cf6c17f..7148623 100644
--- a/xsd-frontend/semantic-graph/fundamental.cxx.m4
+++ b/xsd-frontend/semantic-graph/fundamental.cxx.m4
@@ -31,8 +31,8 @@ define(`fundamental_type_impl', `
$1::
$1 (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column)
+ unsigned long line,
+ unsigned long column)
: Node (file, line, column)
{
}')
@@ -146,8 +146,8 @@ fundamental_type(`id')
IdRef::
IdRef (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column)
+ unsigned long line,
+ unsigned long column)
: Node (file, line, column)
{
}
@@ -172,8 +172,8 @@ fundamental_type(`id')
IdRefs::
IdRefs (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column)
+ unsigned long line,
+ unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/fundamental.hxx.m4 b/xsd-frontend/semantic-graph/fundamental.hxx.m4
index 2474822..7167bc9 100644
--- a/xsd-frontend/semantic-graph/fundamental.hxx.m4
+++ b/xsd-frontend/semantic-graph/fundamental.hxx.m4
@@ -17,8 +17,8 @@ define(`fundamental_type_impl', `
{
public:
$1 (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column);
+ unsigned long line,
+ unsigned long column);
};')
divert(0)dnl
dnl
@@ -104,8 +104,8 @@ fundamental_type(`id')
{
public:
IdRef (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column);
+ unsigned long line,
+ unsigned long column);
};
@@ -116,8 +116,8 @@ fundamental_type(`id')
{
public:
IdRefs (Path const& file,
- SemanticGraph::UnsignedLong line,
- SemanticGraph::UnsignedLong column);
+ unsigned long line,
+ unsigned long column);
};
dnl
dnl URI.
diff --git a/xsd-frontend/semantic-graph/list.cxx b/xsd-frontend/semantic-graph/list.cxx
index 9911b81..bc66f04 100644
--- a/xsd-frontend/semantic-graph/list.cxx
+++ b/xsd-frontend/semantic-graph/list.cxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
namespace SemanticGraph
{
List::
- List (Path const& file, UnsignedLong line, UnsignedLong column)
+ List (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/list.hxx b/xsd-frontend/semantic-graph/list.hxx
index d9f11d0..2ad375c 100644
--- a/xsd-frontend/semantic-graph/list.hxx
+++ b/xsd-frontend/semantic-graph/list.hxx
@@ -15,7 +15,7 @@ namespace XSDFrontend
class List: public virtual Specialization
{
public:
- List (Path const& file, UnsignedLong line, UnsignedLong column);
+ List (Path const& file, unsigned long line, unsigned long column);
};
}
}
diff --git a/xsd-frontend/semantic-graph/namespace.cxx b/xsd-frontend/semantic-graph/namespace.cxx
index a82d1e1..d25638e 100644
--- a/xsd-frontend/semantic-graph/namespace.cxx
+++ b/xsd-frontend/semantic-graph/namespace.cxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
namespace SemanticGraph
{
Namespace::
- Namespace (Path const& file, UnsignedLong line, UnsignedLong column)
+ Namespace (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/namespace.hxx b/xsd-frontend/semantic-graph/namespace.hxx
index 7a2e1eb..cd20631 100644
--- a/xsd-frontend/semantic-graph/namespace.hxx
+++ b/xsd-frontend/semantic-graph/namespace.hxx
@@ -15,9 +15,9 @@ namespace XSDFrontend
class Namespace : public virtual Scope
{
public:
- Namespace (Path const& file, UnsignedLong line, UnsignedLong column);
+ Namespace (Path const& file, unsigned long line, unsigned long column);
- Void
+ void
add_edge_right (BelongsToNamespace&) {}
using Scope::add_edge_right;
diff --git a/xsd-frontend/semantic-graph/particle.cxx b/xsd-frontend/semantic-graph/particle.cxx
index b966086..88e008b 100644
--- a/xsd-frontend/semantic-graph/particle.cxx
+++ b/xsd-frontend/semantic-graph/particle.cxx
@@ -14,7 +14,7 @@ namespace XSDFrontend
// ContainsParticle
//
ContainsParticle::
- ContainsParticle (UnsignedLong min, UnsignedLong max)
+ ContainsParticle (unsigned long min, unsigned long max)
: particle_ (0), compositor_ (0), min_ (min), max_ (max)
{
}
diff --git a/xsd-frontend/semantic-graph/particle.hxx b/xsd-frontend/semantic-graph/particle.hxx
index e66a1ad..50f5f9f 100644
--- a/xsd-frontend/semantic-graph/particle.hxx
+++ b/xsd-frontend/semantic-graph/particle.hxx
@@ -36,41 +36,41 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
return min_;
}
- UnsignedLong
+ unsigned long
max () const
{
return max_;
}
public:
- ContainsParticle (UnsignedLong min, UnsignedLong max);
+ ContainsParticle (unsigned long min, unsigned long max);
- Void
+ void
set_left_node (Compositor& n)
{
compositor_ = &n;
}
- Void
+ void
set_right_node (Particle& n)
{
particle_ = &n;
}
- Void
+ void
clear_left_node (Compositor& n)
{
assert (compositor_ == &n);
compositor_ = 0;
}
- Void
+ void
clear_right_node (Particle& n)
{
assert (particle_ == &n);
@@ -80,7 +80,7 @@ namespace XSDFrontend
private:
Particle* particle_;
Compositor* compositor_;
- UnsignedLong min_, max_;
+ unsigned long min_, max_;
};
//
@@ -88,7 +88,7 @@ namespace XSDFrontend
class Particle: public virtual Node
{
public:
- Boolean
+ bool
contained_particle_p ()
{
return contained_particle_ != 0;
@@ -102,14 +102,14 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
min () const
{
assert (contained_particle_ != 0);
return contained_particle_->min ();
}
- UnsignedLong
+ unsigned long
max () const
{
assert (contained_particle_ != 0);
@@ -119,13 +119,13 @@ namespace XSDFrontend
public:
Particle ();
- Void
+ void
add_edge_right (ContainsParticle& e)
{
contained_particle_ = &e;
}
- Void
+ void
remove_edge_right (ContainsParticle& e)
{
assert (contained_particle_ == &e);
diff --git a/xsd-frontend/semantic-graph/schema.cxx b/xsd-frontend/semantic-graph/schema.cxx
index 3ff8c6d..ec990de 100644
--- a/xsd-frontend/semantic-graph/schema.cxx
+++ b/xsd-frontend/semantic-graph/schema.cxx
@@ -27,7 +27,7 @@ namespace XSDFrontend
NamesConstIterator (names_.end ()));
}
- Void Schema::
+ void Schema::
find_ (Name const& name, NamesList& names, SchemaSet& set) const
{
set.insert (this);
diff --git a/xsd-frontend/semantic-graph/schema.hxx b/xsd-frontend/semantic-graph/schema.hxx
index 1150047..09a6490 100644
--- a/xsd-frontend/semantic-graph/schema.hxx
+++ b/xsd-frontend/semantic-graph/schema.hxx
@@ -42,13 +42,13 @@ namespace XSDFrontend
public:
Uses (Path const& path): path_ (path) {}
- Void
+ void
set_left_node (Schema& s)
{
user_ = &s;
}
- Void
+ void
set_right_node (Schema& s)
{
schema_ = &s;
@@ -104,7 +104,7 @@ namespace XSDFrontend
typedef std::vector<Uses*> UsedList;
public:
- Schema (Path const& file, UnsignedLong line, UnsignedLong column)
+ Schema (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column), graph_ (*this)
{
}
@@ -143,7 +143,7 @@ namespace XSDFrontend
return used_.end ();
}
- Boolean
+ bool
used_p () const
{
return used_begin () != used_end ();
@@ -163,14 +163,14 @@ namespace XSDFrontend
template <typename T>
T&
- new_node (Path const& file, UnsignedLong line, UnsignedLong column)
+ new_node (Path const& file, unsigned long line, unsigned long column)
{
return graph_.new_node<T> (file, line, column);
}
template <typename T, typename A0>
T&
- new_node (Path const& file, UnsignedLong line, UnsignedLong column,
+ new_node (Path const& file, unsigned long line, unsigned long column,
A0 const& a0)
{
return graph_.new_node<T> (file, line, column, a0);
@@ -178,7 +178,7 @@ namespace XSDFrontend
template <typename T, typename A0, typename A1>
T&
- new_node (Path const& file, UnsignedLong line, UnsignedLong column,
+ new_node (Path const& file, unsigned long line, unsigned long column,
A0 const& a0, A1 const& a1)
{
return graph_.new_node<T> (file, line, column, a0, a1);
@@ -186,7 +186,7 @@ namespace XSDFrontend
template <typename T, typename A0, typename A1, typename A2>
T&
- new_node (Path const& file, UnsignedLong line, UnsignedLong column,
+ new_node (Path const& file, unsigned long line, unsigned long column,
A0 const& a0, A1 const& a1, A2 const& a2)
{
return graph_.new_node<T> (file, line, column, a0, a1, a2);
@@ -195,7 +195,7 @@ namespace XSDFrontend
template <typename T, typename A0, typename A1, typename A2,
typename A3>
T&
- new_node (Path const& file, UnsignedLong line, UnsignedLong column,
+ new_node (Path const& file, unsigned long line, unsigned long column,
A0 const& a0, A1 const& a1, A2 const& a2, A3 const& a3)
{
return graph_.new_node<T> (file, line, column, a0, a1, a2, a3);
@@ -205,13 +205,13 @@ namespace XSDFrontend
using Scope::add_edge_left;
using Node::add_edge_right;
- Void
+ void
add_edge_left (Uses& e)
{
uses_.push_back (&e);
}
- Void
+ void
add_edge_right (Uses& e)
{
used_.push_back (&e);
@@ -220,7 +220,7 @@ namespace XSDFrontend
private:
typedef std::set<Schema const*> SchemaSet;
- Void
+ void
find_ (Name const& name, NamesList&, SchemaSet&) const;
private:
diff --git a/xsd-frontend/semantic-graph/union.cxx b/xsd-frontend/semantic-graph/union.cxx
index 111dd13..90053c4 100644
--- a/xsd-frontend/semantic-graph/union.cxx
+++ b/xsd-frontend/semantic-graph/union.cxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
namespace SemanticGraph
{
Union::
- Union (Path const& file, UnsignedLong line, UnsignedLong column)
+ Union (Path const& file, unsigned long line, unsigned long column)
: Node (file, line, column)
{
}
diff --git a/xsd-frontend/semantic-graph/union.hxx b/xsd-frontend/semantic-graph/union.hxx
index b3a130f..0436098 100644
--- a/xsd-frontend/semantic-graph/union.hxx
+++ b/xsd-frontend/semantic-graph/union.hxx
@@ -15,7 +15,7 @@ namespace XSDFrontend
class Union: public virtual Specialization
{
public:
- Union (Path const& file, UnsignedLong line, UnsignedLong column);
+ Union (Path const& file, unsigned long line, unsigned long column);
};
}
}
diff --git a/xsd-frontend/transformations/anonymous.cxx b/xsd-frontend/transformations/anonymous.cxx
index 9dcbf45..afaf66a 100644
--- a/xsd-frontend/transformations/anonymous.cxx
+++ b/xsd-frontend/transformations/anonymous.cxx
@@ -32,12 +32,12 @@ namespace XSDFrontend
Traversal::Any,
Traversal::AnyAttribute
{
- CompareMembers (SemanticGraph::Nameable& m, Boolean& r)
+ CompareMembers (SemanticGraph::Nameable& m, bool& r)
: member_ (m), result_ (r)
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Element& x)
{
using SemanticGraph::Element;
@@ -52,7 +52,7 @@ namespace XSDFrontend
traverse_member (x);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Attribute& x)
{
using SemanticGraph::Attribute;
@@ -67,7 +67,7 @@ namespace XSDFrontend
traverse_member (x);
}
- virtual Void
+ virtual void
traverse_member (SemanticGraph::Member& x)
{
using SemanticGraph::Member;
@@ -108,13 +108,13 @@ namespace XSDFrontend
result_ = true;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Any&)
{
//@@ TODO
}
- virtual Void
+ virtual void
traverse (SemanticGraph::AnyAttribute&)
{
//@@ TODO
@@ -122,7 +122,7 @@ namespace XSDFrontend
private:
SemanticGraph::Nameable& member_;
- Boolean& result_;
+ bool& result_;
};
// Compare two types for structural equality.
@@ -132,13 +132,13 @@ namespace XSDFrontend
Traversal::Enumeration,
Traversal::Complex
{
- CompareTypes (SemanticGraph::Type& t, Boolean& r)
+ CompareTypes (SemanticGraph::Type& t, bool& r)
: type_ (t), result_ (r)
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::List&)
{
using SemanticGraph::List;
@@ -146,7 +146,7 @@ namespace XSDFrontend
//List& y (dynamic_cast<List&> (type_));
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Union& x)
{
using SemanticGraph::Union;
@@ -168,7 +168,7 @@ namespace XSDFrontend
result_ = true;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Enumeration& x)
{
using SemanticGraph::Enumeration;
@@ -207,7 +207,7 @@ namespace XSDFrontend
result_ = true;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Complex& x)
{
using SemanticGraph::Complex;
@@ -261,7 +261,7 @@ namespace XSDFrontend
if (typeid (ix->named ()) != typeid (iy->named ()))
return;
- Boolean equal (false);
+ bool equal (false);
CompareMembers t (iy->named (), equal);
t.dispatch (ix->named ());
@@ -277,7 +277,7 @@ namespace XSDFrontend
private:
SemanticGraph::Type& type_;
- Boolean& result_;
+ bool& result_;
};
//
@@ -288,7 +288,7 @@ namespace XSDFrontend
Context (SemanticGraph::Schema& schema_,
SemanticGraph::Path const& file,
AnonymousNameTranslator& trans_,
- Boolean du)
+ bool du)
: schema_path_ (file),
ns_ (0),
failed_ (false),
@@ -321,7 +321,7 @@ namespace XSDFrontend
if (typeid (x) != typeid (y))
return false;
- Boolean r (false);
+ bool r (false);
CompareTypes t (y, r);
t.dispatch (x);
return r;
@@ -450,17 +450,17 @@ namespace XSDFrontend
private:
SemanticGraph::Path const schema_path_;
SemanticGraph::Namespace* ns_;
- Boolean failed_;
+ bool failed_;
public:
AnonymousNameTranslator& trans;
- Boolean detect_unstable;
+ bool detect_unstable;
public:
SemanticGraph::Schema& schema;
SemanticGraph::Path const& schema_path;
SemanticGraph::Namespace*& ns;
- Boolean& failed;
+ bool& failed;
};
@@ -469,7 +469,7 @@ namespace XSDFrontend
//
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
SemanticGraph::Schema& s (u.schema ());
@@ -491,13 +491,13 @@ namespace XSDFrontend
{
}
- Void
+ void
pre (SemanticGraph::Namespace& ns)
{
ns_ = &ns;
}
- Void
+ void
post (SemanticGraph::Namespace&)
{
ns_ = 0;
@@ -519,7 +519,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::List& l)
{
SemanticGraph::Type& t (l.argumented ().type ());
@@ -555,7 +555,7 @@ namespace XSDFrontend
// Make sure the name is unique.
//
- UnsignedLong n (1);
+ unsigned long n (1);
String escaped (name);
while (conflict (escaped))
@@ -597,7 +597,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Union& u)
{
String file_str;
@@ -639,7 +639,7 @@ namespace XSDFrontend
// Make sure the name is unique.
//
- UnsignedLong n (1);
+ unsigned long n (1);
String escaped (name);
while (conflict (escaped))
@@ -682,7 +682,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Complex& c)
{
if (!c.inherits_p ())
@@ -721,7 +721,7 @@ namespace XSDFrontend
// Make sure the name is unique.
//
- UnsignedLong n (1);
+ unsigned long n (1);
String escaped (name);
while (conflict (escaped))
@@ -776,7 +776,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Element& e)
{
SemanticGraph::Type& t (e.type ());
@@ -819,7 +819,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Attribute& a)
{
SemanticGraph::Type& t (a.type ());
@@ -862,7 +862,7 @@ namespace XSDFrontend
}
}
- Void
+ void
traverse_ (SemanticGraph::Member& m)
{
using SemanticGraph::Type;
@@ -918,7 +918,7 @@ namespace XSDFrontend
// Check if this name conflicts.
//
- UnsignedLong n (1);
+ unsigned long n (1);
String escaped (name);
while (SemanticGraph::Type* other = conflict (escaped))
@@ -965,10 +965,10 @@ namespace XSDFrontend
{
}
- Void Anonymous::
+ void Anonymous::
transform (SemanticGraph::Schema& s,
SemanticGraph::Path const& f,
- Boolean duc)
+ bool duc)
{
Context ctx (s, f, trans_, duc);
diff --git a/xsd-frontend/transformations/anonymous.hxx b/xsd-frontend/transformations/anonymous.hxx
index 285a468..992b7ff 100644
--- a/xsd-frontend/transformations/anonymous.hxx
+++ b/xsd-frontend/transformations/anonymous.hxx
@@ -46,10 +46,10 @@ namespace XSDFrontend
Anonymous (AnonymousNameTranslator&);
- Void
+ void
transform (SemanticGraph::Schema&,
SemanticGraph::Path const&,
- Boolean detect_unstable_conflicts);
+ bool detect_unstable_conflicts);
private:
AnonymousNameTranslator& trans_;
diff --git a/xsd-frontend/transformations/enum-synthesis.cxx b/xsd-frontend/transformations/enum-synthesis.cxx
index 165d162..c1ef5a7 100644
--- a/xsd-frontend/transformations/enum-synthesis.cxx
+++ b/xsd-frontend/transformations/enum-synthesis.cxx
@@ -28,7 +28,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (Type& e)
{
String const& name (e.name ());
@@ -64,7 +64,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (Type& u)
{
using SemanticGraph::Enumeration;
@@ -208,7 +208,7 @@ namespace XSDFrontend
//
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
SemanticGraph::Schema& s (u.schema ());
@@ -224,7 +224,7 @@ namespace XSDFrontend
namespace Transformations
{
- Void EnumSynthesis::
+ void EnumSynthesis::
transform (SemanticGraph::Schema& s, SemanticGraph::Path const&)
{
Traversal::Schema schema;
diff --git a/xsd-frontend/transformations/enum-synthesis.hxx b/xsd-frontend/transformations/enum-synthesis.hxx
index e21fd7e..97658a3 100644
--- a/xsd-frontend/transformations/enum-synthesis.hxx
+++ b/xsd-frontend/transformations/enum-synthesis.hxx
@@ -24,7 +24,7 @@ namespace XSDFrontend
class EnumSynthesis
{
public:
- Void
+ void
transform (SemanticGraph::Schema&, SemanticGraph::Path const&);
};
}
diff --git a/xsd-frontend/transformations/restriction.cxx b/xsd-frontend/transformations/restriction.cxx
index 8b3bac7..dae1f03 100644
--- a/xsd-frontend/transformations/restriction.cxx
+++ b/xsd-frontend/transformations/restriction.cxx
@@ -33,7 +33,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (Type& c)
{
using namespace SemanticGraph;
@@ -152,7 +152,7 @@ namespace XSDFrontend
}
private:
- Void
+ void
handle (SemanticGraph::Particle& r, SemanticGraph::Particle& b)
{
using namespace SemanticGraph;
@@ -214,7 +214,7 @@ namespace XSDFrontend
}
}
- Boolean
+ bool
match (SemanticGraph::Particle& r, SemanticGraph::Particle& b)
{
using namespace SemanticGraph;
@@ -281,7 +281,7 @@ namespace XSDFrontend
return false;
}
- Void
+ void
merge_attributes (SemanticGraph::Complex& c,
SemanticGraph::Complex& base)
{
@@ -363,7 +363,7 @@ namespace XSDFrontend
}
}
- Void
+ void
handle_any_attributes (SemanticGraph::Complex& c, BaseList& bl)
{
using namespace SemanticGraph;
@@ -459,7 +459,7 @@ namespace XSDFrontend
public:
- virtual Void
+ virtual void
traverse (SemanticGraph::Element& e)
{
SemanticGraph::Type& t (e.type ());
@@ -478,7 +478,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Attribute& a)
{
SemanticGraph::Type& t (a.type ());
@@ -506,7 +506,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Complex& c)
{
if (d1_)
@@ -531,7 +531,7 @@ namespace XSDFrontend
//
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
SemanticGraph::Schema& s (u.schema ());
@@ -547,7 +547,7 @@ namespace XSDFrontend
namespace Transformations
{
- Void Restriction::
+ void Restriction::
transform (SemanticGraph::Schema& s, SemanticGraph::Path const&)
{
Traversal::Schema schema;
diff --git a/xsd-frontend/transformations/restriction.hxx b/xsd-frontend/transformations/restriction.hxx
index 1c92681..8cf4cd8 100644
--- a/xsd-frontend/transformations/restriction.hxx
+++ b/xsd-frontend/transformations/restriction.hxx
@@ -30,7 +30,7 @@ namespace XSDFrontend
public:
struct Failed {};
- Void
+ void
transform (SemanticGraph::Schema&, SemanticGraph::Path const&);
};
}
diff --git a/xsd-frontend/transformations/schema-per-type.cxx b/xsd-frontend/transformations/schema-per-type.cxx
index 9c7be34..69b43ca 100644
--- a/xsd-frontend/transformations/schema-per-type.cxx
+++ b/xsd-frontend/transformations/schema-per-type.cxx
@@ -36,7 +36,7 @@ namespace XSDFrontend
//
struct FileComparator
{
- Boolean
+ bool
operator() (NarrowString const& x, NarrowString const& y) const
{
return strcasecmp (x.c_str (), y.c_str ()) < 0;
@@ -60,7 +60,7 @@ namespace XSDFrontend
xsd_ = 0;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Includes& i)
{
SemanticGraph::Schema& s (i.schema ());
@@ -73,7 +73,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Imports& i)
{
SemanticGraph::Schema& s (i.schema ());
@@ -86,7 +86,7 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Implies& i)
{
if (xsd_ == 0)
@@ -98,13 +98,13 @@ namespace XSDFrontend
SemanticGraph::Schema*& xsd_;
};
- Void
+ void
process_schema (SemanticGraph::Schema& s,
SemanticGraph::Schema& root,
SemanticGraph::Schema& xsd,
TypeSchemaMap& tsm,
FileSet& file_set,
- Boolean fat_type_file,
+ bool fat_type_file,
Transformations::SchemaPerTypeTranslator& trans)
{
using namespace SemanticGraph;
@@ -155,7 +155,7 @@ namespace XSDFrontend
//
NarrowString file_name (base);
- for (UnsignedLong i (1);
+ for (unsigned long i (1);
file_set.find (file_name) != file_set.end ();
++i)
{
@@ -261,7 +261,7 @@ namespace XSDFrontend
*this >> names_ >> *this;
}
- virtual Void
+ virtual void
traverse (SemanticGraph::List& l)
{
// Treat item type as base type since it is impossible
@@ -271,7 +271,7 @@ namespace XSDFrontend
set_dep (t, false);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Complex& c)
{
if (c.inherits_p ())
@@ -280,22 +280,22 @@ namespace XSDFrontend
Traversal::Complex::names (c);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Member& m)
{
SemanticGraph::Type& t (m.type ());
- Boolean weak (
+ bool weak (
by_value_key_ == 0 ||
!t.context ().count (by_value_key_) ||
- !t.context ().get<Boolean> (by_value_key_));
+ !t.context ().get<bool> (by_value_key_));
set_dep (t, weak);
}
private:
- Void
- set_dep (SemanticGraph::Type& t, Boolean weak)
+ void
+ set_dep (SemanticGraph::Type& t, bool weak)
{
using namespace SemanticGraph;
@@ -345,7 +345,7 @@ namespace XSDFrontend
{
SchemaPerType::
SchemaPerType (SchemaPerTypeTranslator& trans,
- Boolean fat,
+ bool fat,
Char const* key)
: fat_type_file_ (fat), by_value_key_ (key), trans_ (trans)
{
@@ -402,7 +402,7 @@ namespace XSDFrontend
NarrowString tf (trans_.translate_schema (abs_path));
NarrowString file (tf ? tf : path.leaf ());
- Size p (file.rfind ('.'));
+ size_t p (file.rfind ('.'));
NarrowString ext (
p != NarrowString::npos ? NarrowString (file, p) : "");
@@ -413,7 +413,7 @@ namespace XSDFrontend
//
NarrowString new_name (base);
- for (UnsignedLong n (1);
+ for (unsigned long n (1);
file_set.find (new_name) != file_set.end ();
++n)
{
diff --git a/xsd-frontend/transformations/schema-per-type.hxx b/xsd-frontend/transformations/schema-per-type.hxx
index 65499a2..6e034d6 100644
--- a/xsd-frontend/transformations/schema-per-type.hxx
+++ b/xsd-frontend/transformations/schema-per-type.hxx
@@ -48,14 +48,14 @@ namespace XSDFrontend
// for this type is included "strongly".
//
SchemaPerType (SchemaPerTypeTranslator&,
- Boolean fat_type_file,
+ bool fat_type_file,
Char const* by_value_key = 0);
std::vector<SemanticGraph::Schema*>
transform (SemanticGraph::Schema&);
private:
- Boolean fat_type_file_;
+ bool fat_type_file_;
Char const* by_value_key_;
SchemaPerTypeTranslator& trans_;
};
diff --git a/xsd-frontend/transformations/simplifier.cxx b/xsd-frontend/transformations/simplifier.cxx
index c87779b..ba6b04f 100644
--- a/xsd-frontend/transformations/simplifier.cxx
+++ b/xsd-frontend/transformations/simplifier.cxx
@@ -23,7 +23,7 @@ namespace XSDFrontend
{
}
- virtual Void
+ virtual void
traverse (SemanticGraph::All& a)
{
// The all compositor cannot contain compositors.
@@ -32,7 +32,7 @@ namespace XSDFrontend
remove (a);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Choice& c)
{
// Do the depth-first traversal so that we take into account
@@ -52,7 +52,7 @@ namespace XSDFrontend
remove (c);
}
- virtual Void
+ virtual void
traverse (SemanticGraph::Sequence& s)
{
// Do the depth-first traversal so that we take into account
@@ -71,7 +71,7 @@ namespace XSDFrontend
}
private:
- virtual Void
+ virtual void
remove (SemanticGraph::Compositor& c)
{
using SemanticGraph::Node;
@@ -104,7 +104,7 @@ namespace XSDFrontend
//
struct Type: Traversal::Complex
{
- virtual Void
+ virtual void
traverse (SemanticGraph::Complex& c)
{
if (c.contains_compositor_p ())
@@ -117,7 +117,7 @@ namespace XSDFrontend
//
struct Uses: Traversal::Uses
{
- virtual Void
+ virtual void
traverse (Type& u)
{
SemanticGraph::Schema& s (u.schema ());
@@ -133,7 +133,7 @@ namespace XSDFrontend
namespace Transformations
{
- Void Simplifier::
+ void Simplifier::
transform (SemanticGraph::Schema& s, SemanticGraph::Path const&)
{
Traversal::Schema schema;
diff --git a/xsd-frontend/transformations/simplifier.hxx b/xsd-frontend/transformations/simplifier.hxx
index 9485041..44a3429 100644
--- a/xsd-frontend/transformations/simplifier.hxx
+++ b/xsd-frontend/transformations/simplifier.hxx
@@ -24,7 +24,7 @@ namespace XSDFrontend
class Simplifier
{
public:
- Void
+ void
transform (SemanticGraph::Schema&, SemanticGraph::Path const&);
};
}
diff --git a/xsd-frontend/traversal/attribute-group.cxx b/xsd-frontend/traversal/attribute-group.cxx
index d4bca1c..b80ccaf 100644
--- a/xsd-frontend/traversal/attribute-group.cxx
+++ b/xsd-frontend/traversal/attribute-group.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void AttributeGroup::
+ void AttributeGroup::
traverse (Type& g)
{
pre (g);
@@ -17,12 +17,12 @@ namespace XSDFrontend
post (g);
}
- Void AttributeGroup::
+ void AttributeGroup::
pre (Type&)
{
}
- Void AttributeGroup::
+ void AttributeGroup::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/attribute-group.hxx b/xsd-frontend/traversal/attribute-group.hxx
index 063085e..6634141 100644
--- a/xsd-frontend/traversal/attribute-group.hxx
+++ b/xsd-frontend/traversal/attribute-group.hxx
@@ -15,13 +15,13 @@ namespace XSDFrontend
{
struct AttributeGroup: ScopeTemplate<SemanticGraph::AttributeGroup>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/attribute.cxx b/xsd-frontend/traversal/attribute.cxx
index f94aec4..2463b0a 100644
--- a/xsd-frontend/traversal/attribute.cxx
+++ b/xsd-frontend/traversal/attribute.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void Attribute::
+ void Attribute::
traverse (Type& a)
{
pre (a);
@@ -18,29 +18,29 @@ namespace XSDFrontend
post (a);
}
- Void Attribute::
+ void Attribute::
pre (Type&)
{
}
- Void Attribute::
+ void Attribute::
belongs (Type& a, EdgeDispatcher& d)
{
d.dispatch (a.belongs ());
}
- Void Attribute::
+ void Attribute::
belongs (Type& a)
{
belongs (a, *this);
}
- Void Attribute::
+ void Attribute::
name (Type&)
{
}
- Void Attribute::
+ void Attribute::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/attribute.hxx b/xsd-frontend/traversal/attribute.hxx
index e04df75..91cce8b 100644
--- a/xsd-frontend/traversal/attribute.hxx
+++ b/xsd-frontend/traversal/attribute.hxx
@@ -17,22 +17,22 @@ namespace XSDFrontend
{
struct Attribute : Node<SemanticGraph::Attribute>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
belongs (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
belongs (Type&);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/complex.cxx b/xsd-frontend/traversal/complex.cxx
index 9a07382..7544120 100644
--- a/xsd-frontend/traversal/complex.cxx
+++ b/xsd-frontend/traversal/complex.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void Complex::
+ void Complex::
traverse (Type& c)
{
pre (c);
@@ -20,43 +20,43 @@ namespace XSDFrontend
post (c);
}
- Void Complex::
+ void Complex::
pre (Type&)
{
}
- Void Complex::
+ void Complex::
name (Type&)
{
}
- Void Complex::
+ void Complex::
inherits (Type& c)
{
inherits (c, *this);
}
- Void Complex::
+ void Complex::
inherits (Type& c, EdgeDispatcher& d)
{
if (c.inherits_p ())
d.dispatch (c.inherits ());
}
- Void Complex::
+ void Complex::
contains_compositor (Type& c)
{
contains_compositor (c, *this);
}
- Void Complex::
+ void Complex::
contains_compositor (Type& c, EdgeDispatcher& d)
{
if (c.contains_compositor_p ())
d.dispatch (c.contains_compositor ());
}
- Void Complex::
+ void Complex::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/complex.hxx b/xsd-frontend/traversal/complex.hxx
index 21f42ef..8ae75d4 100644
--- a/xsd-frontend/traversal/complex.hxx
+++ b/xsd-frontend/traversal/complex.hxx
@@ -15,28 +15,28 @@ namespace XSDFrontend
{
struct Complex : ScopeTemplate<SemanticGraph::Complex>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
inherits (Type&);
- Void
+ void
inherits (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
contains_compositor (Type&);
- Void
+ void
contains_compositor (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/compositors.cxx b/xsd-frontend/traversal/compositors.cxx
index c68e7a7..7bf27ad 100644
--- a/xsd-frontend/traversal/compositors.cxx
+++ b/xsd-frontend/traversal/compositors.cxx
@@ -11,7 +11,7 @@ namespace XSDFrontend
{
// ContainsParticle
//
- Void ContainsParticle::
+ void ContainsParticle::
traverse (Type& c)
{
dispatch (c.particle ());
@@ -20,7 +20,7 @@ namespace XSDFrontend
// ContainsCompositor
//
- Void ContainsCompositor::
+ void ContainsCompositor::
traverse (Type& c)
{
dispatch (c.compositor ());
@@ -29,7 +29,7 @@ namespace XSDFrontend
// Compositor
//
- Void Compositor::
+ void Compositor::
traverse (Type& c)
{
pre (c);
@@ -37,25 +37,25 @@ namespace XSDFrontend
post (c);
}
- Void Compositor::
+ void Compositor::
pre (Type&)
{
}
- Void Compositor::
+ void Compositor::
contains (Type& c)
{
iterate_and_dispatch (
c.contains_begin (), c.contains_end (), edge_traverser ());
}
- Void Compositor::
+ void Compositor::
contains (Type& c, EdgeDispatcher& d)
{
iterate_and_dispatch (c.contains_begin (), c.contains_end (), d);
}
- Void Compositor::
+ void Compositor::
post (Type&)
{
}
@@ -63,7 +63,7 @@ namespace XSDFrontend
// All
//
- Void All::
+ void All::
traverse (Type& c)
{
pre (c);
@@ -71,25 +71,25 @@ namespace XSDFrontend
post (c);
}
- Void All::
+ void All::
pre (Type&)
{
}
- Void All::
+ void All::
contains (Type& c)
{
iterate_and_dispatch (
c.contains_begin (), c.contains_end (), edge_traverser ());
}
- Void All::
+ void All::
contains (Type& c, EdgeDispatcher& d)
{
iterate_and_dispatch (c.contains_begin (), c.contains_end (), d);
}
- Void All::
+ void All::
post (Type&)
{
}
@@ -97,7 +97,7 @@ namespace XSDFrontend
// Choice
//
- Void Choice::
+ void Choice::
traverse (Type& c)
{
pre (c);
@@ -105,25 +105,25 @@ namespace XSDFrontend
post (c);
}
- Void Choice::
+ void Choice::
pre (Type&)
{
}
- Void Choice::
+ void Choice::
contains (Type& c)
{
iterate_and_dispatch (
c.contains_begin (), c.contains_end (), edge_traverser ());
}
- Void Choice::
+ void Choice::
contains (Type& c, EdgeDispatcher& d)
{
iterate_and_dispatch (c.contains_begin (), c.contains_end (), d);
}
- Void Choice::
+ void Choice::
post (Type&)
{
}
@@ -131,7 +131,7 @@ namespace XSDFrontend
// Sequence
//
- Void Sequence::
+ void Sequence::
traverse (Type& c)
{
pre (c);
@@ -139,25 +139,25 @@ namespace XSDFrontend
post (c);
}
- Void Sequence::
+ void Sequence::
pre (Type&)
{
}
- Void Sequence::
+ void Sequence::
contains (Type& c)
{
iterate_and_dispatch (
c.contains_begin (), c.contains_end (), edge_traverser ());
}
- Void Sequence::
+ void Sequence::
contains (Type& c, EdgeDispatcher& d)
{
iterate_and_dispatch (c.contains_begin (), c.contains_end (), d);
}
- Void Sequence::
+ void Sequence::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/compositors.hxx b/xsd-frontend/traversal/compositors.hxx
index 5e099e4..a4e447c 100644
--- a/xsd-frontend/traversal/compositors.hxx
+++ b/xsd-frontend/traversal/compositors.hxx
@@ -26,7 +26,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type&);
};
@@ -44,7 +44,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type&);
};
@@ -52,19 +52,19 @@ namespace XSDFrontend
//
struct Compositor : Node<SemanticGraph::Compositor>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
contains (Type&);
- virtual Void
+ virtual void
contains (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
@@ -73,19 +73,19 @@ namespace XSDFrontend
//
struct All : Node<SemanticGraph::All>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
contains (Type&);
- virtual Void
+ virtual void
contains (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
@@ -94,19 +94,19 @@ namespace XSDFrontend
//
struct Choice : Node<SemanticGraph::Choice>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
contains (Type&);
- virtual Void
+ virtual void
contains (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
@@ -115,19 +115,19 @@ namespace XSDFrontend
//
struct Sequence : Node<SemanticGraph::Sequence>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
contains (Type&);
- virtual Void
+ virtual void
contains (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/element-group.cxx b/xsd-frontend/traversal/element-group.cxx
index 1658074..1526c2d 100644
--- a/xsd-frontend/traversal/element-group.cxx
+++ b/xsd-frontend/traversal/element-group.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void ElementGroup::
+ void ElementGroup::
traverse (Type& g)
{
pre (g);
@@ -18,24 +18,24 @@ namespace XSDFrontend
post (g);
}
- Void ElementGroup::
+ void ElementGroup::
pre (Type&)
{
}
- Void ElementGroup::
+ void ElementGroup::
contains_compositor (Type& g, EdgeDispatcher& d)
{
d.dispatch (g.contains_compositor ());
}
- Void ElementGroup::
+ void ElementGroup::
contains_compositor (Type& g)
{
contains_compositor (g, *this);
}
- Void ElementGroup::
+ void ElementGroup::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/element-group.hxx b/xsd-frontend/traversal/element-group.hxx
index 56ddc0f..af45a00 100644
--- a/xsd-frontend/traversal/element-group.hxx
+++ b/xsd-frontend/traversal/element-group.hxx
@@ -15,19 +15,19 @@ namespace XSDFrontend
{
struct ElementGroup: ScopeTemplate<SemanticGraph::ElementGroup>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
contains_compositor (Type&);
- virtual Void
+ virtual void
contains_compositor (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/element.cxx b/xsd-frontend/traversal/element.cxx
index 62e5ee8..5a47214 100644
--- a/xsd-frontend/traversal/element.cxx
+++ b/xsd-frontend/traversal/element.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void Element::
+ void Element::
traverse (Type& m)
{
pre (m);
@@ -18,29 +18,29 @@ namespace XSDFrontend
post (m);
}
- Void Element::
+ void Element::
pre (Type&)
{
}
- Void Element::
+ void Element::
belongs (Type& m, EdgeDispatcher& d)
{
d.dispatch (m.belongs ());
}
- Void Element::
+ void Element::
belongs (Type& m)
{
belongs (m, edge_traverser ());
}
- Void Element::
+ void Element::
name (Type&)
{
}
- Void Element::
+ void Element::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/element.hxx b/xsd-frontend/traversal/element.hxx
index 3e54950..0af2aaf 100644
--- a/xsd-frontend/traversal/element.hxx
+++ b/xsd-frontend/traversal/element.hxx
@@ -15,22 +15,22 @@ namespace XSDFrontend
{
struct Element : Node<SemanticGraph::Element>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
belongs (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
belongs (Type&);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/elements.cxx b/xsd-frontend/traversal/elements.cxx
index f8bc283..c2a2ed9 100644
--- a/xsd-frontend/traversal/elements.cxx
+++ b/xsd-frontend/traversal/elements.cxx
@@ -11,7 +11,7 @@ namespace XSDFrontend
{
// Instance
//
- Void Instance::
+ void Instance::
traverse (Type& a)
{
pre (a);
@@ -19,24 +19,24 @@ namespace XSDFrontend
post (a);
}
- Void Instance::
+ void Instance::
pre (Type&)
{
}
- Void Instance::
+ void Instance::
belongs (Type& a, EdgeDispatcher& d)
{
d.dispatch (a.belongs ());
}
- Void Instance::
+ void Instance::
belongs (Type& a)
{
belongs (a, edge_traverser ());
}
- Void Instance::
+ void Instance::
post (Type&)
{
}
@@ -44,7 +44,7 @@ namespace XSDFrontend
// Member
//
- Void Member::
+ void Member::
traverse (Type& a)
{
pre (a);
@@ -52,24 +52,24 @@ namespace XSDFrontend
post (a);
}
- Void Member::
+ void Member::
pre (Type&)
{
}
- Void Member::
+ void Member::
belongs (Type& a, EdgeDispatcher& d)
{
d.dispatch (a.belongs ());
}
- Void Member::
+ void Member::
belongs (Type& a)
{
belongs (a, edge_traverser ());
}
- Void Member::
+ void Member::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/elements.hxx b/xsd-frontend/traversal/elements.hxx
index 35604e8..bf4b0f1 100644
--- a/xsd-frontend/traversal/elements.hxx
+++ b/xsd-frontend/traversal/elements.hxx
@@ -26,7 +26,7 @@ namespace XSDFrontend
//
struct NodeBase: NodeDispatcher, EdgeDispatcher
{
- Void
+ void
edge_traverser (EdgeDispatcher& d)
{
EdgeDispatcher::traverser (d);
@@ -46,7 +46,7 @@ namespace XSDFrontend
struct EdgeBase: EdgeDispatcher, NodeDispatcher
{
- Void
+ void
node_traverser (NodeDispatcher& d)
{
NodeDispatcher::traverser (d);
@@ -111,7 +111,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.named ());
@@ -132,7 +132,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.type ());
@@ -156,20 +156,20 @@ namespace XSDFrontend
struct ScopeTemplate : Node<T>
{
public:
- virtual Void
+ virtual void
traverse (T& s)
{
names (s);
}
template<typename X>
- Void
+ void
names (T& s,
EdgeDispatcher& d,
- Void (X::*pre_) (T&) = (Void (ScopeTemplate<T>::*)(T&)) (0),
- Void (X::*post_) (T&) = (Void (ScopeTemplate<T>::*)(T&)) (0),
- Void (X::*none_) (T&) = (Void (ScopeTemplate<T>::*)(T&)) (0),
- Void (X::*next_) (T&) = (Void (ScopeTemplate<T>::*)(T&)) (0))
+ void (X::*pre_) (T&) = (void (ScopeTemplate<T>::*)(T&)) (0),
+ void (X::*post_) (T&) = (void (ScopeTemplate<T>::*)(T&)) (0),
+ void (X::*none_) (T&) = (void (ScopeTemplate<T>::*)(T&)) (0),
+ void (X::*next_) (T&) = (void (ScopeTemplate<T>::*)(T&)) (0))
{
X* this_ (dynamic_cast<X*> (this));
@@ -200,13 +200,13 @@ namespace XSDFrontend
}
}
- virtual Void
+ virtual void
names (T& s, EdgeDispatcher& d)
{
names<ScopeTemplate<T> > (s, d);
}
- virtual Void
+ virtual void
names (T& s)
{
names (s,
@@ -217,22 +217,22 @@ namespace XSDFrontend
&ScopeTemplate<T>::names_next);
}
- virtual Void
+ virtual void
names_pre (T&)
{
}
- virtual Void
+ virtual void
names_next (T&)
{
}
- virtual Void
+ virtual void
names_post (T&)
{
}
- virtual Void
+ virtual void
names_none (T&)
{
}
@@ -250,7 +250,7 @@ namespace XSDFrontend
//
struct Type : Node<SemanticGraph::Type>
{
- virtual Void
+ virtual void
traverse (SemanticGraph::Type&) = 0;
};
@@ -259,19 +259,19 @@ namespace XSDFrontend
//
struct Instance : Node<SemanticGraph::Instance>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
belongs (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
belongs (Type&);
- virtual Void
+ virtual void
post (Type&);
};
@@ -280,19 +280,19 @@ namespace XSDFrontend
//
struct Member : Node<SemanticGraph::Member>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
belongs (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
belongs (Type&);
- virtual Void
+ virtual void
post (Type&);
};
@@ -310,7 +310,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.base ());
@@ -331,7 +331,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.base ());
@@ -352,7 +352,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.base ());
@@ -373,7 +373,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& a)
{
dispatch (a.type ());
@@ -386,7 +386,7 @@ namespace XSDFrontend
//
struct Contains : Edge<SemanticGraph::Contains>
{
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.element ());
diff --git a/xsd-frontend/traversal/enumeration.cxx b/xsd-frontend/traversal/enumeration.cxx
index 9dfae89..e8d2c07 100644
--- a/xsd-frontend/traversal/enumeration.cxx
+++ b/xsd-frontend/traversal/enumeration.cxx
@@ -11,7 +11,7 @@ namespace XSDFrontend
{
// Enumeration
//
- Void Enumeration::
+ void Enumeration::
traverse (Type& e)
{
pre (e);
@@ -21,30 +21,30 @@ namespace XSDFrontend
post (e);
}
- Void Enumeration::
+ void Enumeration::
pre (Type&)
{
}
- Void Enumeration::
+ void Enumeration::
name (Type&)
{
}
- Void Enumeration::
+ void Enumeration::
inherits (Type& e)
{
inherits (e, *this);
}
- Void Enumeration::
+ void Enumeration::
inherits (Type& e, EdgeDispatcher& d)
{
if (e.inherits_p ())
d.dispatch (e.inherits ());
}
- Void Enumeration::
+ void Enumeration::
post (Type&)
{
}
@@ -52,7 +52,7 @@ namespace XSDFrontend
// Enumerator
//
- Void Enumerator::
+ void Enumerator::
traverse (Type& e)
{
pre (e);
@@ -61,29 +61,29 @@ namespace XSDFrontend
post (e);
}
- Void Enumerator::
+ void Enumerator::
pre (Type&)
{
}
- Void Enumerator::
+ void Enumerator::
belongs (Type& e, EdgeDispatcher& d)
{
d.dispatch (e.belongs ());
}
- Void Enumerator::
+ void Enumerator::
belongs (Type& e)
{
belongs (e, edge_traverser ());
}
- Void Enumerator::
+ void Enumerator::
name (Type&)
{
}
- Void Enumerator::
+ void Enumerator::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/enumeration.hxx b/xsd-frontend/traversal/enumeration.hxx
index f8aeaf7..610f490 100644
--- a/xsd-frontend/traversal/enumeration.hxx
+++ b/xsd-frontend/traversal/enumeration.hxx
@@ -15,43 +15,43 @@ namespace XSDFrontend
{
struct Enumeration : ScopeTemplate<SemanticGraph::Enumeration>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
inherits (Type&);
- Void
+ void
inherits (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
post (Type&);
};
struct Enumerator : Node<SemanticGraph::Enumerator>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
belongs (Type&, EdgeDispatcher&);
- virtual Void
+ virtual void
belongs (Type&);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/list.cxx b/xsd-frontend/traversal/list.cxx
index 523a43c..39203d6 100644
--- a/xsd-frontend/traversal/list.cxx
+++ b/xsd-frontend/traversal/list.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void List::
+ void List::
traverse (Type& l)
{
pre (l);
@@ -18,29 +18,29 @@ namespace XSDFrontend
post (l);
}
- Void List::
+ void List::
pre (Type&)
{
}
- Void List::
+ void List::
argumented (Type& l)
{
argumented (l, *this);
}
- Void List::
+ void List::
argumented (Type& l, EdgeDispatcher& d)
{
d.dispatch (l.argumented ());
}
- Void List::
+ void List::
name (Type&)
{
}
- Void List::
+ void List::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/list.hxx b/xsd-frontend/traversal/list.hxx
index 6105de8..1e96b09 100644
--- a/xsd-frontend/traversal/list.hxx
+++ b/xsd-frontend/traversal/list.hxx
@@ -15,22 +15,22 @@ namespace XSDFrontend
{
struct List: Node<SemanticGraph::List>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
argumented (Type&);
- virtual Void
+ virtual void
argumented (Type&, EdgeDispatcher& d);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/namespace.hxx b/xsd-frontend/traversal/namespace.hxx
index 1a3ae74..b1024da 100644
--- a/xsd-frontend/traversal/namespace.hxx
+++ b/xsd-frontend/traversal/namespace.hxx
@@ -15,7 +15,7 @@ namespace XSDFrontend
{
struct Namespace: ScopeTemplate<SemanticGraph::Namespace>
{
- virtual Void
+ virtual void
traverse (Type& m)
{
pre (m);
@@ -24,17 +24,17 @@ namespace XSDFrontend
post (m);
}
- virtual Void
+ virtual void
pre (Type&)
{
}
- virtual Void
+ virtual void
name (Type&)
{
}
- virtual Void
+ virtual void
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/particle.cxx b/xsd-frontend/traversal/particle.cxx
index 02bdc25..82bf609 100644
--- a/xsd-frontend/traversal/particle.cxx
+++ b/xsd-frontend/traversal/particle.cxx
@@ -11,19 +11,19 @@ namespace XSDFrontend
{
// Particle
//
- Void Particle::
+ void Particle::
traverse (Type& c)
{
pre (c);
post (c);
}
- Void Particle::
+ void Particle::
pre (Type&)
{
}
- Void Particle::
+ void Particle::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/particle.hxx b/xsd-frontend/traversal/particle.hxx
index 6cdb9bf..688d6f9 100644
--- a/xsd-frontend/traversal/particle.hxx
+++ b/xsd-frontend/traversal/particle.hxx
@@ -15,13 +15,13 @@ namespace XSDFrontend
{
struct Particle : Node<SemanticGraph::Particle>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/traversal/schema.hxx b/xsd-frontend/traversal/schema.hxx
index b3f0831..bf45e98 100644
--- a/xsd-frontend/traversal/schema.hxx
+++ b/xsd-frontend/traversal/schema.hxx
@@ -26,7 +26,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.schema ());
@@ -46,7 +46,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.schema ());
@@ -67,7 +67,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.schema ());
@@ -88,7 +88,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.schema ());
@@ -109,7 +109,7 @@ namespace XSDFrontend
node_traverser (n);
}
- virtual Void
+ virtual void
traverse (Type& e)
{
dispatch (e.schema ());
@@ -121,7 +121,7 @@ namespace XSDFrontend
//
struct Schema: ScopeTemplate<SemanticGraph::Schema>
{
- virtual Void
+ virtual void
traverse (Type& s)
{
pre (s);
@@ -134,12 +134,12 @@ namespace XSDFrontend
post (s);
}
- virtual Void
+ virtual void
pre (Type&)
{
}
- virtual Void
+ virtual void
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/union.cxx b/xsd-frontend/traversal/union.cxx
index 26522ec..c0f0790 100644
--- a/xsd-frontend/traversal/union.cxx
+++ b/xsd-frontend/traversal/union.cxx
@@ -9,7 +9,7 @@ namespace XSDFrontend
{
namespace Traversal
{
- Void Union::
+ void Union::
traverse (Type& u)
{
pre (u);
@@ -18,29 +18,29 @@ namespace XSDFrontend
post (u);
}
- Void Union::
+ void Union::
pre (Type&)
{
}
- Void Union::
+ void Union::
argumented (Type& u)
{
argumented (u, *this);
}
- Void Union::
+ void Union::
argumented (Type& u, EdgeDispatcher& d)
{
iterate_and_dispatch (u.argumented_begin (), u.argumented_end (), d);
}
- Void Union::
+ void Union::
name (Type&)
{
}
- Void Union::
+ void Union::
post (Type&)
{
}
diff --git a/xsd-frontend/traversal/union.hxx b/xsd-frontend/traversal/union.hxx
index fe79929..3b72bb4 100644
--- a/xsd-frontend/traversal/union.hxx
+++ b/xsd-frontend/traversal/union.hxx
@@ -15,22 +15,22 @@ namespace XSDFrontend
{
struct Union: Node<SemanticGraph::Union>
{
- virtual Void
+ virtual void
traverse (Type&);
- virtual Void
+ virtual void
pre (Type&);
- virtual Void
+ virtual void
argumented (Type&);
- virtual Void
+ virtual void
argumented (Type&, EdgeDispatcher& d);
- virtual Void
+ virtual void
name (Type&);
- virtual Void
+ virtual void
post (Type&);
};
}
diff --git a/xsd-frontend/types.hxx b/xsd-frontend/types.hxx
index 7608681..f3512e1 100644
--- a/xsd-frontend/types.hxx
+++ b/xsd-frontend/types.hxx
@@ -6,10 +6,14 @@
#ifndef XSD_FRONTEND_TYPES_HXX
#define XSD_FRONTEND_TYPES_HXX
+#include <cstddef> // std::size_t
+
#include <cult/types.hxx>
namespace XSDFrontend
{
+ using std::size_t;
+
using namespace Cult::Types;
typedef Cult::WideString String;
diff --git a/xsd-frontend/xml.hxx b/xsd-frontend/xml.hxx
index 95621e1..4b8effa 100644
--- a/xsd-frontend/xml.hxx
+++ b/xsd-frontend/xml.hxx
@@ -23,9 +23,9 @@ namespace XSDFrontend
inline
String
- transcode (XMLCh const* s, Size length)
+ transcode (XMLCh const* s, size_t length)
{
- if (sizeof (WideChar) == 4)
+ if (sizeof (wchar_t) == 4)
{
// UTF-32
//
@@ -33,8 +33,8 @@ namespace XSDFrontend
// Find what the resulting buffer size will be.
//
- Size rl (0);
- Boolean valid (true);
+ size_t rl (0);
+ bool valid (true);
for (XMLCh const* p (s); p < end; ++p)
{
@@ -59,27 +59,27 @@ namespace XSDFrontend
String r;
r.reserve (rl + 1);
r.resize (rl);
- WideChar* rs (const_cast<WideChar*> (r.c_str ()));
+ wchar_t* rs (const_cast<wchar_t*> (r.c_str ()));
- Size i (0);
+ size_t i (0);
for (XMLCh const* p (s); p < end; ++p)
{
XMLCh x (*p);
if (x < 0xD800 || x > 0xDBFF)
- rs[i++] = WideChar (x);
+ rs[i++] = wchar_t (x);
else
rs[i++] = ((x - 0xD800) << 10) + (*++p - 0xDC00) + 0x10000;
}
return r;
}
- else if (sizeof (WideChar) == 2)
+ else if (sizeof (wchar_t) == 2)
{
// UTF-16
//
- return String (reinterpret_cast<const WideChar*> (s), length);
+ return String (reinterpret_cast<const wchar_t*> (s), length);
}
else
return String ();
@@ -106,16 +106,16 @@ namespace XSDFrontend
XMLCh*
transcode (String const& str)
{
- Size l (str.size ());
- WideChar const* s (str.c_str ());
+ size_t l (str.size ());
+ wchar_t const* s (str.c_str ());
- if (sizeof (WideChar) == 4)
+ if (sizeof (wchar_t) == 4)
{
// Find what the resulting buffer size will be.
//
- Size rl (0);
+ size_t rl (0);
- for (WideChar const* p (s); p < s + l; ++p)
+ for (wchar_t const* p (s); p < s + l; ++p)
{
rl += (*p & 0xFFFF0000) ? 2 : 1;
}
@@ -123,9 +123,9 @@ namespace XSDFrontend
XMLCh* r (new XMLCh[rl + 1]);
XMLCh* ir (r);
- for (WideChar const* p (s); p < s + l; ++p)
+ for (wchar_t const* p (s); p < s + l; ++p)
{
- WideChar w (*p);
+ wchar_t w (*p);
if (w & 0xFFFF0000)
{
@@ -142,12 +142,12 @@ namespace XSDFrontend
return r;
}
- else if (sizeof (WideChar) == 2)
+ else if (sizeof (wchar_t) == 2)
{
XMLCh* r (new XMLCh[l + 1]);
XMLCh* ir (r);
- for (Size i (0); i < l; ++ir, ++i)
+ for (size_t i (0); i < l; ++ir, ++i)
*ir = static_cast<XMLCh> (s[i]);
*ir = XMLCh (0);
@@ -166,7 +166,7 @@ namespace XSDFrontend
{
}
- XMLChString (WideChar const* s)
+ XMLChString (wchar_t const* s)
: s_ (transcode (String (s)))
{
}
@@ -216,20 +216,20 @@ namespace XSDFrontend
}
public:
- UnsignedLong
+ unsigned long
line () const
{
//@@ cache
//
- return reinterpret_cast<UnsignedLong> (e_->getUserData (line_key));
+ return reinterpret_cast<unsigned long> (e_->getUserData (line_key));
}
- UnsignedLong
+ unsigned long
column () const
{
//@@ cache
//
- return reinterpret_cast<UnsignedLong> (e_->getUserData (column_key));
+ return reinterpret_cast<unsigned long> (e_->getUserData (column_key));
}
public:
@@ -242,7 +242,7 @@ namespace XSDFrontend
public:
// Attribute identified by a name.
//
- Boolean
+ bool
attribute_p (String const& name) const
{
return attribute_p ("", name);
@@ -263,7 +263,7 @@ namespace XSDFrontend
// Attribute identified by namespace and name.
//
- Boolean
+ bool
attribute_p (String const& namespace_, String const& name) const
{
Xerces::DOMAttr* a (
@@ -302,7 +302,7 @@ namespace XSDFrontend
inline String
prefix (String const& n)
{
- Size i (0);
+ size_t i (0);
while (i < n.length () && n[i] != L':') ++i;
//std::wcerr << "prefix " << n << " "
@@ -314,7 +314,7 @@ namespace XSDFrontend
inline String
uq_name (String const& n)
{
- Size i (0);
+ size_t i (0);
while (i < n.length () && n[i] != L':') ++i;
return String (n.c_str () + (i == n.length () ? 0 : i + 1));
@@ -377,7 +377,7 @@ namespace XSDFrontend
if (p == 0)
{
- Boolean r (e.dom_element ()->isDefaultNamespace (ns.c_str ()));
+ bool r (e.dom_element ()->isDefaultNamespace (ns.c_str ()));
if (r)
return L"";
@@ -517,9 +517,9 @@ namespace XSDFrontend
// Conversion to bool.
//
- typedef X* (AutoPtr::*BooleanConvertible)() const;
+ typedef X* (AutoPtr::*boolConvertible)() const;
- operator BooleanConvertible () const throw ()
+ operator boolConvertible () const throw ()
{
return x_ ? &AutoPtr<X>::operator-> : 0;
}
@@ -543,7 +543,7 @@ namespace XSDFrontend
}
}
- Void
+ void
push_back (AutoPtr<X>& x)
{
Base::push_back (0);