Newer
Older
#ifndef FILEWRAPPER_H
#define FILEWRAPPER_H
#include <Configuration.h>
#include <tango.h>
#include <boost/filesystem.hpp>
namespace DataExporter_ns
{
class FileWrapper : public Tango::LogAdapter
{
public:
//------------------------------------------------------------------------------
// [Public] Shared pointer typedef
//------------------------------------------------------------------------------
typedef boost::shared_ptr<FileWrapper> SP;
protected:
//------------------------------------------------------------------------------
// [Protected] Constructor destructor deleter
//------------------------------------------------------------------------------
FileWrapper(Tango::DeviceImpl*, boost::filesystem::path&);
class Deleter;
friend Deleter;
class Deleter
{
public:
void operator()(FileWrapper* d) { delete d; }
};
public:
//------------------------------------------------------------------------------
// [Public] Class creation method
//------------------------------------------------------------------------------
static FileWrapper::SP create(Tango::DeviceImpl*, boost::filesystem::path&);
//------------------------------------------------------------------------------
// [Public] Input stream methods
//------------------------------------------------------------------------------
virtual bool isOpen();
protected:
//------------------------------------------------------------------------------
// [Protected] Class variables
//------------------------------------------------------------------------------
//Input file size
//Input file stream
std::ifstream m_inputFileStream;
//Read buffer size