
/*
**  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(_EXPORT_H_)

#define _EXPORT_H_

#include <absobj.h>


class goblinExport : public goblinAbstractObject
{                                        
private:

    char                currentLevel;
    char                currentPos;
    char                currentType;
    ofstream            expFile;
    goblinController&   CT;

public:

    goblinExport(char* expFileName,
        goblinController &thisContext = goblinDefaultContext) throw(ERFile);
    ~goblinExport() throw();
	
    char*           Display() throw() {return NULL;};
    char*           Label() throw() {return NULL;};
    unsigned long   Size() throw() {return 0;};
    ofstream&       Stream() throw() {return expFile;};

    void    StartTuple(char* header,char type) throw(ERRejected);
    void    StartTuple(unsigned long k,char type) throw(ERRejected);
    void    EndTuple() throw(ERRejected);
    void    MakeIntItem(long int item,char length) throw();
    void    MakeFloatItem(TFloat item,char length) throw();
    void    MakeNoItem(char length) throw();
    
    enum    TConfig {CONF_DIFF=0,CONF_FULL=1};
        
    void    WriteConfiguration(goblinDataObject *) throw();
    void    WriteConfiguration(goblinController &,TConfig = CONF_DIFF) throw();
	
};                             


#endif
