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

#ifndef ALLLOGWRITER_H_
#define ALLLOGWRITER_H_

#include "DecimationLogWriter.h"


/// Base class for a generalized set of "log data destinations," including
/// to files (text or binary), over communications links, etc.
///
/// \ingroup logging
class AllLogWriter : public DecimationLogWriter
{
public:

    /// Constructor
    AllLogWriter( LogWriter& outputTo );

    /// Destructor
    virtual ~AllLogWriter();

    /// Write the log header, if any
    virtual unsigned int writeHeader();

    /// Write the given LogEntry - should lock the writeMutex_
    virtual unsigned int write( const LogEntry* entry, const Unit* unit = NULL );

    /// Do what needs to be done at the end of the cycle.
    virtual void endCycle();

    /// Write the log footer, if any
    virtual unsigned int writeFooter();

private:
    // Note that the copy constructor below is private and not given a body.
    // Any attempt to call it will return a compiler error.
    AllLogWriter( const AllLogWriter& old ); // disallow copy constructor

};

#endif /*ALLLOGWRITER_H_*/
