ManaPlus
rwops.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2013-2019 The ManaPlus Developers
4  * Copyright (C) 2009-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 /*
23  * This code provides a glue layer between PhysicsFS and Simple Directmedia
24  * Layer's (SDL) RWops i/o abstraction.
25  *
26  * License: this code is public domain. I make no warranty that it is useful,
27  * correct, harmless, or environmentally safe.
28  *
29  * This particular file may be used however you like, including copying it
30  * verbatim into a closed-source project, exploiting it commercially, and
31  * removing any trace of my name from the source (although I hope you won't
32  * do that). I welcome enhancements and corrections to this file, but I do
33  * not require you to send me patches if you make changes. This code has
34  * NO WARRANTY.
35  *
36  * Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
37  * Please see LICENSE.txt in the root of the source tree.
38  *
39  * SDL falls under the LGPL license. You can get SDL at http://www.libsdl.org/
40  *
41  * This file was written by Ryan C. Gordon. ([email protected]).
42  *
43  * Copyright (C) 2012-2019 The ManaPlus Developers
44  * Copyright (C) 2009-2021 Andrei Karas
45  */
46 
47 #ifndef SRC_FS_VIRTFSRWOPS_H
48 #define SRC_FS_VIRTFSRWOPS_H
49 
50 #include "localconsts.h"
51 
52 #include <string>
53 
54 struct SDL_RWops;
55 
56 namespace VirtFs
57 {
58  struct File;
59 
60  SDL_RWops *create_rwops(File *const file,
61  const std::string &restrict fname);
62 
63  SDL_RWops *rwopsOpenRead(const std::string &restrict fname);
64  SDL_RWops *rwopsOpenWrite(const std::string &restrict fname) A_WARN_UNUSED;
65  SDL_RWops *rwopsOpenAppend(const std::string &restrict fname)
67 } // namespace VirtFs
68 
69 #endif // SRC_FS_VIRTFSRWOPS_H
#define restrict
Definition: localconsts.h:165
#define A_WARN_UNUSED
Definition: localconsts.h:161
SDL_RWops * create_rwops(File *const file, const std::string &fname)
Definition: rwops.cpp:66
SDL_RWops * rwopsOpenWrite(const std::string &fname)
Definition: rwops.cpp:132
SDL_RWops * rwopsOpenRead(const std::string &fname)
Definition: rwops.cpp:107
SDL_RWops * rwopsOpenAppend(const std::string &fname)
Definition: rwops.cpp:143