◆ Tileson()
tson::Tileson::Tileson |
( |
std::unique_ptr< tson::IJson > |
jsonParser = std::make_unique<tson::Json11>() , |
|
|
bool |
includeBase64Decoder = true |
|
) |
| |
|
inlineexplicit |
- Parameters
-
includeBase64Decoder | Includes the base64-decoder from "Base64Decompressor.hpp" if true. Otherwise no other decompressors/decoders than whatever the user itself have added will be used. |
◆ decompressors()
Gets the decompressor container used when something is either encoded or compressed (regardless: IDecompressor is used as base). These are used specifically for tile layers, and are connected by checking the name of the IDecompressor. If the name of a decompressor matches with an encoding or a compression, its decompress() function will be used.
- Returns
- The container including all decompressors.
◆ parse() [1/2]
std::unique_ptr< tson::Map > tson::Tileson::parse |
( |
const fs::path & |
path, |
|
|
std::unique_ptr< IDecompressor< std::vector< uint8_t >, std::vector< uint8_t > > > |
decompressor = nullptr |
|
) |
| |
|
inline |
Parses Tiled json map data by file
- Parameters
-
- Returns
- parsed data as Map
◆ parse() [2/2]
std::unique_ptr< tson::Map > tson::Tileson::parse |
( |
const void * |
data, |
|
|
size_t |
size, |
|
|
std::unique_ptr< IDecompressor< std::vector< uint8_t >, std::vector< uint8_t > > > |
decompressor = nullptr |
|
) |
| |
|
inline |
Parses Tiled json map data by memory
- Parameters
-
data | The data to parse |
size | The size of the data to parse |
- Returns
- parsed data as Map
◆ parseJson()
std::unique_ptr< tson::Map > tson::Tileson::parseJson |
( |
| ) |
|
|
inlineprivate |
Common parsing functionality for doing the json parsing
- Parameters
-
- Returns
- parsed data as Map
The documentation for this class was generated from the following file: