// -*- c++ -*-
#ifndef AKAXISO_SIMPLETYPE_HANDLER_H__
#define AKAXISO_SIMPLETYPE_HANDLER_H__

#include <akaxiso/parser/handler.h>

namespace aka2 {

  class simpletype_handler : public handler {
  public:
    simpletype_handler(const qname &tagname, void *sim, int depth, const simpletype_op &sop, 
		       parser_context &context);
    virtual ~simpletype_handler(){}
    virtual parse_result query_element(const qname &tagname, const attribute_values &attrs);
    virtual parse_result end_element(const qname &tagname);
    virtual parse_result query_next(const qname &tagname, const attribute_values &attrs);

    virtual bool parse_entity(const std::string &entity);

    // Mainly used for choices.
    virtual node get_node();
    virtual void receive_child(const node &child);

    virtual bool can_skip();
    virtual void abort(); 

  private:
    void *elm_;
    const simpletype_op &sop_;
  };

}

#endif

