/* -*- mode: c++; indent-tabs-mode: nil; -*-
 *
 * This file is part of the Mango recipe management distribution.
 * Copyright (c) 2000-2003, Roland Jesse
 * All rights reserved.
 *
 * For license and copyright information see the file COPYRIGHT or 
 * <http://www.opensource.org/licenses/bsd-license.html>.
 *
 * $Id: MangoImporter.h,v 1.4 2003/03/01 20:40:37 rjesse Exp $
 */
 
#ifndef MANGO_IMPORTER_H
#define MANGO_IMPORTER_H

#include "Importer.h"

/*!
  Class for importing files in %Mango's native file format.
  \sa MangoExporter
*/
class MangoImporter : public Importer {
      Q_OBJECT

   public:
	  MangoImporter();			//!< Constructor.
	  ~MangoImporter();			//!< Destructor.

      virtual RecipeModel& apply() throw(Error);

   protected:
      virtual void readCookbookHeader();
      virtual void readAllRecipes();
      virtual void readRecipe();
      virtual void readRecipeHeader();
      virtual void readRecipeBody();

   private:
      QDataStream m_stream;
      Q_INT32 m_version;
};
#endif // MANGO_IMPORTER_H
