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

#include "io.h"

#include <ostream>
#include <iostream>
#include <string>
#include <map>

#include <coral/core/ElementDefinition.h>
#include "xmi_writer_common.h"

#ifdef SWIG
#error SWIG should not include coral/core/io/xmi_writer_1.h
#endif

namespace coral {
     class EXPORTFWD_coral Element;
     class EXPORTFWD_coral Slot;
     class EXPORTFWD_coral Set;

     namespace io {
	  class XMIStreamer: public XMIStreamerCommon {
	  private:
		  void saveElement(std::set<const coral::Element*>& saved_elements,
				   coral::Set* all,
				   std::ostream& out,
				   const coral::Element* elem,
				   int margin,
				   coral::kind_t,
				   bool multiple_mof_datatype_elems);
		  bool m_is_poseidon_hack;
	  public:
		  XMIStreamer();
		  virtual ~XMIStreamer() throw ();
		  void saveModel(const coral::Collection*,
				 std::ostream& out = std::cout)
			  throw (std::exception);
	  };
     }
}

#endif

