// file : xsde/cxx/hybrid/generator.hxx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef CXX_HYBRID_GENERATOR_HXX #define CXX_HYBRID_GENERATOR_HXX #include #include #include #include #include // Path #include #include #include #include #include #include namespace CXX { namespace Hybrid { using namespace Cult::Types; class Generator { public: struct Failed {}; static Void usage (); static CLI::OptionsSpec options_spec (); static Parser::CLI::Options* parser_options (CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); static Serializer::CLI::Options* serializer_options (CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); // Calculate type sizes. // static Void calculate_size ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, WarningSet const& disabled_warnings); // Assign names to global declarations. // static Void process_tree_names ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); static Void process_parser_names ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); static Void process_serializer_names ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&); // Generate code. // static UnsignedLong generate_tree ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, Boolean file_per_type, WarningSet const& disabled_warnings, TypeMap::Namespaces& parser_type_map, TypeMap::Namespaces& serializer_type_map, FileList&, AutoUnlinks&); static UnsignedLong generate_parser ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, Boolean file_per_type, WarningSet const& disabled_warnings, FileList&, AutoUnlinks&); static UnsignedLong generate_serializer ( CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, XSDFrontend::SemanticGraph::Path const&, Boolean file_per_type, WarningSet const& disabled_warnings, FileList&, AutoUnlinks&); private: Generator (); }; } } #endif // CXX_HYBRID_GENERATOR_HXX