// Copyright (C) 2005-2006 Code Synthesis Tools CC
//
// This program was generated by XML Schema Definition Compiler (XSD)
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
// In addition, as a special exception, Code Synthesis Tools CC gives
// permission to link this program with the Xerces-C++ library (or with
// modified versions of Xerces-C++ that use the same license as Xerces-C++),
// and distribute linked combinations including the two. You must obey
// the GNU General Public License version 2 in all respects for all of
// the code used other than Xerces-C++. If you modify this copy of the
// program, you may extend this exception to your version of the program,
// but you are not obligated to do so. If you do not wish to do so, delete
// this exception statement from your version.
//
// In addition, Code Synthesis Tools CC makes a special exception for
// the Free/Libre and Open Source Software (FLOSS) which is described
// in the accompanying FLOSSE file.
//

#ifndef HELLO_HXX
#define HELLO_HXX

#include <xsd/cxx/version.hxx>

#if (XSD_INT_VERSION != 2020000L)
#error XSD runtime version mismatch
#endif

// Begin prologue.
//
//
// End prologue.

#include <xsd/cxx/pre.hxx>

#ifndef XSD_USE_CHAR
#define XSD_USE_CHAR
#endif

#ifndef XSD_CXX_PARSER_USE_CHAR
#define XSD_CXX_PARSER_USE_CHAR
#endif

#include <xsd/cxx/parser/exceptions.hxx>
#include <xsd/cxx/parser/elements.hxx>
#include <xsd/cxx/parser/non-validating/parser.hxx>
#include <xsd/cxx/parser/non-validating/types.hxx>
#include <xsd/cxx/parser/xerces/elements.hxx>

namespace xml_schema
{
  // Generic parser.
  //
#ifndef XSD_CXX_PARSER_XERCES_CHAR_PARSER_IN___XML_SCHEMA
#define XSD_CXX_PARSER_XERCES_CHAR_PARSER_IN___XML_SCHEMA

  template <typename X>
  struct parser: virtual ::xsd::cxx::parser::parser< X, char >,
  virtual ::xsd::cxx::parser::non_validating::empty_content< char >
  {
  };

  template <typename X>
  struct document: ::xsd::cxx::parser::xerces::document< X, char >
  {
    document (::xsd::cxx::parser::parser< X, char >& p,
              const ::std::basic_string< char >& root_element_name)
    : ::xsd::cxx::parser::xerces::document< X, char > (
      p,
      root_element_name)
    {
    }

    document (::xsd::cxx::parser::parser< X, char >& p,
              const ::std::basic_string< char >& root_element_namespace,
              const ::std::basic_string< char >& root_element_name)
    : ::xsd::cxx::parser::xerces::document< X, char > (
      p,
      root_element_namespace,
      root_element_name)
    {
    }
  };

#endif


  // Parsers for XML Schema built-in types.
  //

  // 8-bit
  //
  typedef ::xsd::cxx::parser::non_validating::byte< char > byte;
  typedef ::xsd::cxx::parser::non_validating::unsigned_byte< char > unsigned_byte;

  // 16-bit
  //
  typedef ::xsd::cxx::parser::non_validating::short_< char > short_;
  typedef ::xsd::cxx::parser::non_validating::unsigned_short< char > unsigned_short;

  // 32-bit
  //
  typedef ::xsd::cxx::parser::non_validating::int_< char > int_;
  typedef ::xsd::cxx::parser::non_validating::unsigned_int< char > unsigned_int;

  // 64-bit
  //
  typedef ::xsd::cxx::parser::non_validating::long_< char > long_;
  typedef ::xsd::cxx::parser::non_validating::unsigned_long< char > unsigned_long;

  // Boolean.
  //
  typedef ::xsd::cxx::parser::non_validating::boolean< char > boolean;

  // Floating-point types.
  //
  typedef ::xsd::cxx::parser::non_validating::float_< char > float_;
  typedef ::xsd::cxx::parser::non_validating::double_< char > double_;
  typedef ::xsd::cxx::parser::non_validating::decimal< char > decimal;

  // String.
  //
  typedef ::xsd::cxx::parser::non_validating::string< char > string;


  // Exceptions. See libxsd/xsd/cxx/parser/exceptions.hxx for details.
  //
  typedef ::xsd::cxx::parser::exception< char > exception;
  typedef ::xsd::cxx::parser::parsing< char > parsing;
  typedef ::xsd::cxx::parser::unexpected_element< char > unexpected_element;


  // Parsing flags. See libxsd/xsd/cxx/parser/elements.hxx for details.
  //
  typedef ::xsd::cxx::parser::xerces::flags flags;


  // Parsing properties. See libxsd/xsd/cxx/parser/elements.hxx for details.
  //
  typedef ::xsd::cxx::parser::xerces::properties< char > properties;
}

namespace _xsd_hello_type
{
  template < typename x >
  struct _xsd_greeting
  {
    virtual ~_xsd_greeting ();
    virtual void greeting (const x&);
    void _xsd_call_glue_greeting (::xsd::cxx::parser::parser< x, char >*);
  };

  template < typename x >
  struct _xsd_name
  {
    virtual ~_xsd_name ();
    virtual void name (const x&);
    void _xsd_call_glue_name (::xsd::cxx::parser::parser< x, char >*);
  };

  template < typename _xsd_greeting_, typename _xsd_name_ >
  struct hello_type:
    virtual ::xsd::cxx::parser::non_validating::complex_content< char >,
    _xsd_greeting< _xsd_greeting_ >,
    _xsd_name< _xsd_name_ >
  {
    // Parser construction API.
    //
    void
    greeting_parser (::xsd::cxx::parser::parser< _xsd_greeting_, char >&);

    void
    name_parser (::xsd::cxx::parser::parser< _xsd_name_, char >&);

    void
    parsers (::xsd::cxx::parser::parser< _xsd_greeting_, char >&,
             ::xsd::cxx::parser::parser< _xsd_name_, char >&);

    hello_type ();


    // Implementation.
    //
    protected:
    virtual bool
    _start_element_impl (const ::std::basic_string< char >&,
                         const ::std::basic_string< char >&);

    virtual bool
    _end_element_impl (const ::std::basic_string< char >&,
                       const ::std::basic_string< char >&);

    protected:
    ::xsd::cxx::parser::parser< _xsd_greeting_, char >* _xsd_greeting__;
    ::xsd::cxx::parser::parser< _xsd_name_, char >* _xsd_name__;
  };
}

template < typename _xsd_hello_type_, typename _xsd_greeting_, typename _xsd_name_ >
struct hello_type:
  virtual ::xsd::cxx::parser::parser< _xsd_hello_type_, char >,
  virtual _xsd_hello_type::hello_type< _xsd_greeting_, _xsd_name_ >
{
  /*

  Parser hooks. Override them in your implementation.

  virtual void pre ();

  virtual void greeting (const _xsd_greeting_&);
  virtual void name (const _xsd_name_&);

  virtual _xsd_hello_type_ post ();

  */
};

#include "hello.txx"

#include <xsd/cxx/post.hxx>

// Begin epilogue.
//
//
// End epilogue.

#endif // HELLO_HXX
