mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Use COutputStream in CMapSaverJson
This commit is contained in:
parent
c965f9d02d
commit
7d16585f89
@ -11,6 +11,8 @@
|
||||
#include "StdInc.h"
|
||||
#include "MapFormatJson.h"
|
||||
|
||||
#include "../filesystem/CInputStream.h"
|
||||
#include "../filesystem/COutputStream.h"
|
||||
#include "CMap.h"
|
||||
#include "../CModHandler.h"
|
||||
#include "../VCMI_Lib.h"
|
||||
@ -182,8 +184,15 @@ void CMapLoaderJson::readPlayerInfo()
|
||||
}
|
||||
|
||||
///CMapSaverJson
|
||||
void CMapSaverJson::saveMap(const std::unique_ptr<CMap>& map)
|
||||
CMapSaverJson::CMapSaverJson(COutputStream * stream):
|
||||
output(stream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CMapSaverJson::saveMap(const std::unique_ptr<CMap>& map)
|
||||
{
|
||||
assert(0); // Not implemented
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
class TriggeredEvent;
|
||||
class CInputStream;
|
||||
class COutputStream;
|
||||
|
||||
class DLL_LINKAGE CMapFormatJson
|
||||
{
|
||||
@ -116,5 +117,18 @@ private:
|
||||
class DLL_LINKAGE CMapSaverJson : public CMapFormatJson, public IMapSaver
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param stream a stream to save the map to
|
||||
*/
|
||||
CMapSaverJson(COutputStream * stream);
|
||||
|
||||
/**
|
||||
* Actually saves the VCMI/Json map into stream.
|
||||
*
|
||||
*/
|
||||
void saveMap(const std::unique_ptr<CMap> & map) override;
|
||||
private:
|
||||
COutputStream * output;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user