// file      : xsde/cxx/parser/sys-error.hxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2007 Code Synthesis Tools CC
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#ifndef XSDE_CXX_PARSER_SYS_ERROR_HXX
#define XSDE_CXX_PARSER_SYS_ERROR_HXX

namespace xsde
{
  namespace cxx
  {
    namespace parser
    {
      struct sys_error
      {
        enum value
        {
          none,
          no_memory,
          open_failed,
          read_failed
        };

        sys_error (value);

        operator value () const
        {
          return v_;
        }

        static const char*
        text (value);

      private:
        value v_;
      };
    }
  }
}

#include <xsde/cxx/parser/sys-error.ixx>

#endif  // XSDE_CXX_PARSER_SYS_ERROR_HXX
