/** \file
 *
 *  Contains the DirectoryLogWriter class definition.
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 *
 */

#ifndef DIRECTORYLOGWRITER_H_
#define DIRECTORYLOGWRITER_H_

#include "BinaryLogWriter.h"

#include "io/OutStream.h"

/**
 *  Defines a LogWriter specific to writing binary values to a stream
 *  See FileLogWriter for output to the filesystem.
 *
 *  \ingroup logging
 */
class DirectoryLogWriter : public BinaryLogWriter
{
public:
    /// Default Constructor.
    DirectoryLogWriter( bool forceInitialized = false );

    /// Destructor.
    virtual ~DirectoryLogWriter();

    virtual unsigned int writeHeader();


private:

    /// Has the directory been initialized?
    static bool Initialized_;

    /// Have we restarted the app?
    static bool Restarted_;

    /// Have we been initiailized?
    bool initialized_;

    /// Lets Supervisor call Uninitialize
    friend class Supervisor;

    /// Unsets Initialized_
    static void Uninitialize();

};

#endif /*DIRECTORYLOGWRITER_H_*/
