#ifndef H_CORAL_IO_XMI_READER_2
#define H_CORAL_IO_XMI_READER_2
// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include <coral/coral.h>

#include "xmi_reader_common.h"

#include "libxml2internal.h"

namespace coral {
	class EXPORTFWD_coral Element;
	class EXPORTFWD_coral Language;
	namespace io {
		/*
		 * _state contains the necessary information for
		 * loading one XMI stream. Most of the work is
		 * in taking care of the various references.
		 */
		struct _state2 : public xmistate {
			std::vector<bool> reading_elem;
			_state2();
			~_state2() throw ();
			xmistate* newState();
			bool isXMIPrefix(const char* s);
			bool isXSIPrefix(const char* s);
			int postProcess(all_states_t& all_states,
					const std::string& old_filename);
			
			int loadIt();
		protected:
			virtual void handleBadID();
		};

	}
}
#endif

