36 lines
483 B
C++
36 lines
483 B
C++
#ifndef __MFile_h__
|
|
#define __MFile_h__
|
|
|
|
#include "MString.h"
|
|
#include <fstream>
|
|
#include <iostream>
|
|
|
|
///
|
|
/// MFile
|
|
///
|
|
/// An MString with a file backing store.
|
|
///
|
|
|
|
namespace coreutils {
|
|
|
|
class MFile : public MString {
|
|
|
|
public:
|
|
MFile(MString fileName);
|
|
virtual ~MFile();
|
|
|
|
coreutils::MString fileName;
|
|
|
|
private:
|
|
std::ifstream inFile;
|
|
std::ofstream outFile;
|
|
|
|
void onChange() override;
|
|
void update();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|