mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Remove unused interface
This commit is contained in:
@@ -22,30 +22,30 @@ class IMapLoader;
|
||||
class IMapPatcher;
|
||||
|
||||
/**
|
||||
* The map service provides loading of VCMI/H3 map files. It can
|
||||
* be extended to save maps later as well.
|
||||
* The map service provides loading and saving of VCMI/H3 map files.
|
||||
*/
|
||||
class DLL_LINKAGE IMapService
|
||||
class DLL_LINKAGE CMapService
|
||||
{
|
||||
public:
|
||||
IMapService() = default;
|
||||
virtual ~IMapService() = default;
|
||||
CMapService() = default;
|
||||
virtual ~CMapService() = default;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map file specified by the name.
|
||||
*
|
||||
* @param name the name of the map
|
||||
* @return a unique ptr to the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMap> loadMap(const ResourceID & name) const = 0;
|
||||
|
||||
std::unique_ptr<CMap> loadMap(const ResourceID & name) const;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map header specified by the name.
|
||||
*
|
||||
* @param name the name of the map
|
||||
* @return a unique ptr to the loaded map header class
|
||||
*/
|
||||
virtual std::unique_ptr<CMapHeader> loadMapHeader(const ResourceID & name) const = 0;
|
||||
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const ResourceID & name) const;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map file from a buffer. This method is temporarily
|
||||
* in use to ease the transition to use the new map service.
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
* @param name indicates name of file that will be used during map header patching
|
||||
* @return a unique ptr to the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMap> loadMap(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const = 0;
|
||||
|
||||
std::unique_ptr<CMap> loadMap(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const;
|
||||
|
||||
/**
|
||||
* Loads the VCMI/H3 map header from a buffer. This method is temporarily
|
||||
* in use to ease the transition to use the new map service.
|
||||
@@ -72,22 +72,9 @@ public:
|
||||
* @param name indicates name of file that will be used during map header patching
|
||||
* @return a unique ptr to the loaded map class
|
||||
*/
|
||||
virtual std::unique_ptr<CMapHeader> loadMapHeader(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const = 0;
|
||||
|
||||
virtual void saveMap(const std::unique_ptr<CMap> & map, boost::filesystem::path fullPath) const = 0;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE CMapService : public IMapService
|
||||
{
|
||||
public:
|
||||
CMapService() = default;
|
||||
virtual ~CMapService() = default;
|
||||
|
||||
std::unique_ptr<CMap> loadMap(const ResourceID & name) const override;
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const ResourceID & name) const override;
|
||||
std::unique_ptr<CMap> loadMap(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const override;
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const override;
|
||||
void saveMap(const std::unique_ptr<CMap> & map, boost::filesystem::path fullPath) const override;
|
||||
std::unique_ptr<CMapHeader> loadMapHeader(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const;
|
||||
|
||||
void saveMap(const std::unique_ptr<CMap> & map, boost::filesystem::path fullPath) const;
|
||||
private:
|
||||
/**
|
||||
* Gets a map input stream object specified by a map name.
|
||||
|
||||
Reference in New Issue
Block a user