TorqueScript  0.2
standardfilehandle.hpp
1 
15 #pragma once
16 
17 #include <fstream>
18 
19 #include <torquescript/filehandlebase.hpp>
20 
21 namespace TorqueScript
22 {
24  {
25  public:
26  StandardFileHandle(const std::string& path);
27 
28  virtual bool isOpen();
29 
30  virtual void seek(const std::streampos& position);
31  virtual void seek(const std::streampos& offset, std::ios_base::seekdir way);
32 
33  virtual bool isEOF();
34  virtual std::streampos tell();
35  virtual void read(char* out, const std::size_t size);
36  virtual void close();
37  virtual void write(const char* buffer, const std::size_t size);
38 
39  virtual void openForWrite();
40  virtual void openForRead();
41  virtual void openForReadAndWrite();
42 
43  virtual bool exists();
44  virtual bool deleteFile();
45 
46  virtual std::string readLine();
47 
48  private:
49  std::fstream mFileHandle;
50  };
51 }
Definition: filehandlebase.hpp:23
Definition: standardfilehandle.hpp:24
Definition: ast.hpp:28