| 1 | // -*- coding: utf-8 -*- |
| 2 | // |
| 3 | // AddonResourceProvider.hxx --- ResourceProvider subclass for add-on files |
| 4 | // Copyright (C) 2018 Florent Rougon |
| 5 | // |
| 6 | // This program is free software; you can redistribute it and/or modify |
| 7 | // it under the terms of the GNU General Public License as published by |
| 8 | // the Free Software Foundation; either version 2 of the License, or |
| 9 | // (at your option) any later version. |
| 10 | // |
| 11 | // This program 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 |
| 14 | // GNU General Public License for more details. |
| 15 | // |
| 16 | // You should have received a copy of the GNU General Public License along |
| 17 | // with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | |
| 20 | #ifndef FG_ADDON_RESOURCE_PROVIDER_HXX |
| 21 | #define FG_ADDON_RESOURCE_PROVIDER_HXX |
| 22 | |
| 23 | #include <string> |
| 24 | |
| 25 | #include <simgear/misc/ResourceManager.hxx> |
| 26 | #include <simgear/misc/sg_path.hxx> |
| 27 | |
| 28 | namespace flightgear |
| 29 | { |
| 30 | |
| 31 | namespace addons |
| 32 | { |
| 33 | |
| 34 | class ResourceProvider : public simgear::ResourceProvider |
| 35 | { |
| 36 | public: |
| 37 | ResourceProvider(); |
| 38 | |
| 39 | virtual SGPath resolve(const std::string& resource, SGPath& context) const |
| 40 | override; |
| 41 | }; |
| 42 | |
| 43 | } // of namespace addons |
| 44 | |
| 45 | } // of namespace flightgear |
| 46 | |
| 47 | #endif // of FG_ADDON_RESOURCE_PROVIDER_HXX |