/** * @file File.h * @date created on Jan 13, 2010 * @author Oliver Rudolph */ #ifndef FILE_H_ #define FILE_H_ // Dr.Etchy #include "../../include/common.h" #include "../devices/DeviceDataType.h" // MS Windows DLL handling #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #if _MSC_VER > 1000 #pragma once #endif #if defined(IO_DLL) #define DLLSPEC __declspec(dllexport) #else #define DLLSPEC __declspec(dllimport) #endif #else // for other OS #define DLLSPEC #endif namespace dretchy { namespace io { class DLLSPEC File { private: text_t filename_; DeviceDataType type_; text_t content_; public: File(const text_t &filename); File(const text_t &filename, const text_t &content); File(const text_t &filename, const DeviceDataType type); File(const text_t &filename, const DeviceDataType type, const text_t &content); const text_t & filename() const; const DeviceDataType & type() const; virtual void read() = 0; virtual void write() const = 0; const text_t & content() const; void content(const text_t &t); }; } // namespace io } // namespace dretchy #ifdef DLLSPEC #undef DLLSPEC #endif #endif /* FILE_H_ */