Putting Buffers in main to test things out.
This commit is contained in:
11
Buffer.h
11
Buffer.h
@@ -59,6 +59,8 @@ public:
|
||||
FileStatusNonExistent = 5,
|
||||
};
|
||||
|
||||
static std::string FileStatusToString(FileStatus status);
|
||||
|
||||
|
||||
static bool StatusOK(FileStatus status)
|
||||
{ return status == FileStatus::FileStatusOK; }
|
||||
@@ -74,11 +76,16 @@ public:
|
||||
/// Instantiate a Buffer pointing to fPath.
|
||||
Buffer(std::string fName, std::string fPath);
|
||||
|
||||
void Close();
|
||||
|
||||
/// Instantiate a buffer from a filesystem path.
|
||||
Buffer(std::filesystem::path fPath);
|
||||
|
||||
std::string Name() const
|
||||
{ return this->name; }
|
||||
|
||||
bool IsVirtual()
|
||||
{ return this->file.has_value(); }
|
||||
{ return !this->file.has_value(); }
|
||||
|
||||
Buffer::FileStatus Flush(OptString altPath);
|
||||
|
||||
@@ -100,6 +107,8 @@ public:
|
||||
bool IsDirty()
|
||||
{ return this->dirty; }
|
||||
|
||||
size_t Size();
|
||||
|
||||
private:
|
||||
void clearContents();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user