diff options
Diffstat (limited to 'xsde/cxx/serializer/type-processor.cxx')
-rw-r--r-- | xsde/cxx/serializer/type-processor.cxx | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/xsde/cxx/serializer/type-processor.cxx b/xsde/cxx/serializer/type-processor.cxx index c331309..16d5760 100644 --- a/xsde/cxx/serializer/type-processor.cxx +++ b/xsde/cxx/serializer/type-processor.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file -#include <cult/containers/set.hxx> +#include <set> #include <cxx/serializer/elements.hxx> #include <cxx/serializer/type-processor.hxx> @@ -11,6 +11,8 @@ #include <xsd-frontend/semantic-graph.hxx> #include <xsd-frontend/traversal.hxx> +using namespace std; + namespace CXX { namespace Serializer @@ -23,14 +25,14 @@ namespace CXX { Type (SemanticGraph::Schema& schema, TypeMap::Namespaces& type_map, - Boolean add_includes) + bool add_includes) : schema_ (schema), type_map_ (type_map), add_includes_ (add_includes) { } - virtual Void + virtual void traverse (SemanticGraph::Type& type) { using TypeMap::Namespace; @@ -48,7 +50,7 @@ namespace CXX // match the type in order to add include directives to the // new root schema. // - Boolean set (true); + bool set (true); if (tc.count ("s:ret-type")) { @@ -69,12 +71,12 @@ namespace CXX // std::wcerr << "traversing: " << ns_name << "#" << t_name << endl; - for (Namespaces::ConstIterator n (type_map_.begin ()); + for (Namespaces::const_iterator n (type_map_.begin ()); n != type_map_.end (); ++n) { // Check if the namespace matches. // - Boolean ns_match; + bool ns_match; if (!n->xsd_name ().empty ()) { @@ -135,7 +137,7 @@ namespace CXX arg_type = ret_type; else { - WideChar last (ret_type[ret_type.size () - 1]); + wchar_t last (ret_type[ret_type.size () - 1]); // If it is already a pointer or reference then use // it as is. @@ -162,8 +164,7 @@ namespace CXX { if (n->includes_begin () != n->includes_end ()) { - typedef Cult::Containers::Set<String> Includes; - + typedef std::set<String> Includes; SemanticGraph::Context& sc (schema_.context ()); if (!sc.count ("s:includes")) @@ -189,14 +190,14 @@ namespace CXX private: SemanticGraph::Schema& schema_; TypeMap::Namespaces& type_map_; - Boolean add_includes_; + bool add_includes_; }; // // struct BaseType: Traversal::Complex { - virtual Void + virtual void traverse (SemanticGraph::Complex& c) { Complex::names (c); @@ -215,7 +216,7 @@ namespace CXX *this >> inherits_ >> *this; } - virtual Void + virtual void traverse (SemanticGraph::Complex& c) { type_.dispatch (c); @@ -238,8 +239,8 @@ namespace CXX { GlobalType (SemanticGraph::Schema& schema, TypeMap::Namespaces& type_map, - Boolean add_includes, - Boolean tiein) + bool add_includes, + bool tiein) : type_ (schema, type_map, add_includes), base_hierarchy_ (type_) { inherits_ >> type_; @@ -260,20 +261,20 @@ namespace CXX } } - virtual Void + virtual void traverse (SemanticGraph::Type& t) { type_.traverse (t); } - virtual Void + virtual void traverse (SemanticGraph::List& l) { type_.traverse (l); Traversal::List::argumented (l, argumented_); } - virtual Void + virtual void traverse (SemanticGraph::Complex& c) { type_.traverse (c); @@ -282,7 +283,7 @@ namespace CXX Complex::names (c, names_); } - virtual Void + virtual void traverse (SemanticGraph::Enumeration& e) { type_.traverse (e); @@ -301,12 +302,12 @@ namespace CXX Traversal::Argumented argumented_; }; - Void + void process_impl (options const& ops, XSDFrontend::SemanticGraph::Schema& tu, TypeMap::Namespaces& type_map) { - Boolean tiein (!ops.reuse_style_mixin () && !ops.reuse_style_none ()); + bool tiein (!ops.reuse_style_mixin () && !ops.reuse_style_none ()); if (tu.names_begin ()->named ().name () == L"http://www.w3.org/2001/XMLSchema") @@ -329,7 +330,7 @@ namespace CXX // If --extern-xml-schema is specified, then we don't want // includes from the XML Schema type map. // - Boolean extern_xml_schema (ops.extern_xml_schema ()); + bool extern_xml_schema (ops.extern_xml_schema ()); // Besides types defined in this schema, also process those // referenced by global elements in case we are generating @@ -370,7 +371,7 @@ namespace CXX } } - Void TypeProcessor:: + void TypeProcessor:: process (options const& ops, XSDFrontend::SemanticGraph::Schema& s, TypeMap::Namespaces& tm) |