// Copyright (C) 2005 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

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

#include <xsd/cxx/pre.hxx>

#include <xsd/cxx/parser/exceptions.hxx>
#include <xsd/cxx/parser/elements.hxx>
#include <xsd/cxx/parser/types.hxx>

namespace xml_schema
{
  // Parsers for XML Schema built-in types.
  //

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

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

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

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

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

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

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


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

template < typename _xsd_hello, typename _xsd_greeting, typename _xsd_name>
struct hello: ::xsd::cxx::parser::traverser< _xsd_hello, char >
{
  // Parser hooks. Override them in your implementation.
  //

  virtual void
  greeting (_xsd_greeting const&);

  virtual void
  name (_xsd_name const&);

  using ::xsd::cxx::parser::traverser< _xsd_hello, char >::pre;
  using ::xsd::cxx::parser::traverser< _xsd_hello, char >::characters;
  using ::xsd::cxx::parser::traverser< _xsd_hello, char >::post;


  // Parser construction API.
  //

  void
  greeting (::xsd::cxx::parser::traverser< _xsd_greeting, char >&);

  void
  name (::xsd::cxx::parser::traverser< _xsd_name, char >&);

  void
  operator() (::xsd::cxx::parser::traverser< _xsd_greeting, char >&, ::xsd::cxx::parser::traverser< _xsd_name, char >&);


  // Implementation.
  //
  protected:

  virtual void
  start_element (::std::basic_string< char > const& ns, ::std::basic_string< char > const& n);

  virtual void
  end_element (::std::basic_string< char > const& ns, ::std::basic_string< char > const& n);

  virtual void
  attribute (::std::basic_string< char > const& ns, ::std::basic_string< char > const& n, ::std::basic_string< char > const& v);

  private:

  ::xsd::cxx::parser::traverser< _xsd_greeting, char >* _xsd_greeting_;
  ::xsd::cxx::parser::traverser< _xsd_name, char >* _xsd_name_;
};

#include "hello.txx"

#include <xsd/cxx/post.hxx>

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

#endif // HELLO_HXX
