
/*
**  This file forms part of the GOBLIN C++ Class Library.
**
**  Written by Christian Fremuth-Paeger, December 1998.
**  
**  Copying, compiling, distribution and modification
**  of this source code is permitted only in accordance
**  with the GOBLIN general licence information.
*/             


#if !defined(_IMPORT_H_)

#define _IMPORT_H_

#include <context.h>
#include <fstream.h>


class goblinImport
{                                        
private:

	char *			buffer;
	char			currentLevel;
	char			head;
	char			trail;
    ifstream		impFile;
	unsigned long	length;
    goblinController& CT;

public:             

	goblinImport(char *impFileName,
        goblinController &thisContext = goblinDefaultContext) throw(ERFile);
	~goblinImport() throw(ERParse);

	char *			Scan(char *token = NULL) throw(ERParse);
	char            Seek(char *token) throw(ERParse);
	char			Head() throw();
	char			Trail() throw();
	char			Eof() throw();

	TNode *			GetTNodeTuple(unsigned long k) throw(ERParse);
	TArc *			GetTArcTuple(unsigned long k) throw(ERParse);
	TCap *			GetTCapTuple(unsigned long k) throw(ERParse);
	TFloat *		GetTFloatTuple(unsigned long k) throw(ERParse);
	char *		    GetCharTuple(unsigned long k) throw(ERParse);
	void		    ReadConfiguration() throw(ERParse);
	char			Constant() throw();
	unsigned long	Length() throw();
	
};                             


#endif
