
/*
**  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>


class goblinImport : public goblinAbstractObject
{                                        
private:

    char*           buffer;
    char            currentLevel;
    bool            head;
    bool            tail;
    bool            complain;
    ifstream        impFile;
    unsigned long   length;
    goblinController& CT;

public:             

    goblinImport(char*,goblinController& = goblinDefaultContext) throw(ERFile);
    ~goblinImport() throw(ERParse);
	
    char*           Display() throw() {return NULL;};
    char*           Label() throw() {return NULL;};
    unsigned long   Size() throw() {return 0;};
    ifstream&       Stream() throw() {return impFile;};

    char*           Scan(char* = NULL,TOwnership = OWNED_BY_RECEIVER) throw(ERParse);
    bool            Seek(char* token) throw(ERParse);
    bool            Head() throw();
    bool            Tail() throw();
    bool            Eof() throw();

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


#endif
