#ifndef INCLUDE_NASTDUMPCONTEXTFILE_H
#define INCLUDE_NASTDUMPCONTEXTFILE_H
//-----------------------------------------------------------------------------
// NastDumpContextFile.h
//-----------------------------------------------------------------------------
//
//  Copyright (C) 1998 Technische Universitaet Muenchen, Germany
//                   written by Bernhard Brueck
//
//  This file is part of Nast++
//
//-----------------------------------------------------------------------------
// NastDumpContextFile ist eine konkrete Implementierung eines 
// CNastDumpContextes zur Ausgabe von Debuginformationenen. Zur Implementation
// wurde ein Stream verwendet. Das ermoeglicht die Ausgabe direkt in 
// ein File, oder auch auf cout und cerr. Mit den string-streams ist auch
// eine Ausgabe in strings moeglich.
//
//-----------------------------------------------------------------------------
//  Aenderungen:
//     

#include "NastConfig.h"
#include "NastDumpContext.h"

class ostream;

class CNastDumpContextFile : public CNastDumpContext
{
public:
    //-------------------------------------------------------------------------
    //                         Construktor + Destruktor
    //-------------------------------------------------------------------------
    
    CNastDumpContextFile( ostream &stream ); 
    virtual ~CNastDumpContextFile();		
    
    //-------------------------------------------------------------------------
    //  einfache Datentypen ausgeben
    //-------------------------------------------------------------------------
    virtual CNastDumpContext& operator<<( bool b );
    virtual CNastDumpContext& operator<<( int n );
    virtual CNastDumpContext& operator<<( long int n );
    virtual CNastDumpContext& operator<<( float f );
    virtual CNastDumpContext& operator<<( double f );
    virtual CNastDumpContext& operator<<( long double f );
    virtual CNastDumpContext& operator<<( char ch);
    virtual CNastDumpContext& operator<<( const char *pch);
    virtual CNastDumpContext& operator<<( const unsigned char *pch);
    
    // CNastObjects
    virtual CNastDumpContext& operator<<( const CNastObject *pObject);
    virtual CNastDumpContext& operator<<( const CNastObject &rObject);
    
    //-------------------------------------------------------------------------
    // Flush sollte alles so rausschreiben, dass auch bei einem Absturz
    // des Programms keine Daten verloren gehen
    //-------------------------------------------------------------------------
    virtual void flush();			

private:
    CNastDumpContextFile( const CNastDumpContextFile & o);	            //  nicht impl.
    const CNastDumpContextFile& operator=( const CNastDumpContextFile &o ); //  nicht impl.

    //-------------------------------------------------------------------------
    //  Membervariablen
    //------------------------------------------------------------------------
    ostream &m_streamOut;
};
#endif // INCLUDE_CNASTDUMPCONTEXTFILE_H

