Debian Codegraph @

engine/core/vfs/vfs.i

raw
1 /***************************************************************************
2 * Copyright (C) 2005-2019 by the FIFE team *
3 * http://www.fifengine.net *
4 * This file is part of FIFE. *
5 * *
6 * FIFE is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Lesser General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2.1 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20 ***************************************************************************/
21
22 %module fife
23 %{
24 #include "util/base/exception.h"
25 #include "vfs/vfs.h"
26 %}
27
28 %include "vfs/raw/rawdata.i"
29
30 namespace std{
31 %template(StringSet) set<std::string>;
32 }
33
34 namespace std {
35 %template(vectoru) vector<uint8_t>;
36 };
37
38
39 namespace FIFE {
40 class VFS {
41 public:
42
43 VFS();
44 virtual ~VFS();
45
46 void cleanup();
47
48 void addNewSource(const std::string& path);
49 void removeSource(const std::string& path);
50
51 bool exists(const std::string& file) const;
52 RawData* open(const std::string& path);
53
54 std::set<std::string> listFiles(const std::string& path) const;
55 std::set<std::string> listDirectories(const std::string& path) const;
56 };
57 }
58