source: trunk/src/lol/sys/file.h @ 2361

Last change on this file since 2361 was 2361, checked in by sam, 8 years ago

sys: prototype for the file reading functions.

File size: 983 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://www.wtfpl.net/ for more details.
9//
10
11//
12// File and buffer reading
13// -----------------------
14//
15
16#if !defined __LOL_SYS_FILE_H__
17#define __LOL_SYS_FILE_H__
18
19#include <stdint.h>
20
21namespace lol
22{
23
24struct FileAccess
25{
26    enum Value
27    {
28        Read = 0,
29        Write,
30    }
31    m_value;
32
33    inline FileAccess(Value v) : m_value(v) {}
34    inline operator Value() { return m_value; }
35};
36
37class File
38{
39public:
40    File();
41    File(File const &that);
42    File &operator =(File const &that);
43    ~File();
44
45    void Open(String const &file, FileAccess mode);
46    String ReadString();
47    void Close();
48
49private:
50    class FileData *m_data;
51};
52
53} /* namespace lol */
54
55#endif // __LOL_SYS_FILE_H__
56
Note: See TracBrowser for help on using the repository browser.