// -*- c++ -*-
#ifndef AKAXISO_CLOSURE_HANDLER_H__
#define AKAXISO_CLOSUER_HANDLER_H__

#include <akaxiso/parser/handler.h>
#include <akaxiso/parser/sequence_handler.h>

namespace aka2 {

  class closure_handler : public handler {
  public:
    closure_handler(const qname &tagname, sequence_handler *seq, int depth);
    virtual ~closure_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);

    virtual node get_node();
    virtual void receive_child(const node &child);
    virtual bool can_skip();
    virtual void abort(){}

  private:
    sequence_handler *seqhandler_;
    sequence_handler *inner_;
  };

}

#endif
