Tileson 1.4.0
A helpful json parser for Tiled maps
|
Classes | |
class | Animation |
class | Base64 |
class | Base64Decompressor |
class | Chunk |
class | Color |
class | DecompressorContainer |
struct | EnableBitMaskOperators |
class | EnumDefinition |
class | EnumValue |
class | FlaggedTile |
class | Frame |
class | Gason |
class | Grid |
class | IDecompressor |
class | IJson |
class | Json11 |
class | Layer |
class | Map |
class | MemoryBuffer |
class | MemoryStream |
class | Object |
class | Project |
class | ProjectData |
class | ProjectFolder |
class | ProjectPropertyTypes |
class | Property |
class | PropertyCollection |
class | Rect |
class | Terrain |
class | Text |
class | Tile |
class | TiledClass |
class | TileObject |
class | Tileset |
class | Tileson |
class | Tools |
class | Transformations |
class | Vector2 |
class | WangColor |
class | WangSet |
class | WangTile |
class | World |
class | WorldMapData |
Typedefs | |
typedef Color< uint8_t > | Colori |
typedef Color< float > | Colorf |
typedef Vector2< int > | Vector2i |
typedef Vector2< float > | Vector2f |
using | LinkedFileParser = std::function< std::unique_ptr< IJson >(std::string relativePath)> |
Enumerations | |
enum class | Type : uint8_t { Undefined = 0 , Color = 1 , File = 2 , Int = 3 , Boolean = 4 , Float = 5 , String = 6 , Class = 7 , Enum = 8 , Object = 9 } |
enum class | LayerType : uint8_t { Undefined = 0 , TileLayer = 1 , ObjectGroup = 2 , ImageLayer = 3 , Group = 4 } |
enum class | ParseStatus : uint8_t { OK = 0 , FileNotFound = 1 , ParseError = 2 , MissingData = 3 , DecompressionError = 4 } |
enum class | ObjectType : uint8_t { Undefined = 0 , Object = 1 , Ellipse = 2 , Rectangle = 3 , Point = 4 , Polygon = 5 , Polyline = 6 , Text = 7 , Template = 8 } |
enum class | TileFlipFlags : uint32_t { None = 0 , Diagonally = FLIPPED_DIAGONALLY_FLAG , Vertically = FLIPPED_VERTICALLY_FLAG , Horizontally = FLIPPED_HORIZONTALLY_FLAG } |
enum class | ObjectAlignment : uint8_t { Unspecified = 0 , TopLeft = 1 , Top = 2 , TopRight = 3 , Left = 4 , Center = 5 , Right = 6 , BottomLeft = 7 , Bottom = 8 , BottomRight = 9 } |
enum class | TextAlignment : uint8_t { Unresolved = 0 , Left = 1 , Center = 2 , Right = 3 , Justify = 4 , Top = 5 , Bottom = 6 } |
enum class | TileRenderSize : uint8_t { Undefined = 0 , Tile = 1 , Grid = 2 } |
enum class | FillMode : uint8_t { Undefined = 0 , Stretch = 1 , PreserveAspectFit = 2 } |
enum class | EnumStorageType : uint8_t { Unspecified = 0 , Int = 1 , String = 2 } |
Functions | |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type | operator| (Enum lhs, Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type | operator& (Enum lhs, Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type | operator^ (Enum lhs, Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type | operator~ (Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & | operator|= (Enum &lhs, Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & | operator&= (Enum &lhs, Enum rhs) |
template<typename Enum > | |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & | operator^= (Enum &lhs, Enum rhs) |
IJson * | readField (const std::string &fieldName, IJson &main, IJson *templ=nullptr) |
bool | readField (Text &field, const std::string &fieldName, IJson &main, IJson *templ=nullptr) |
bool | readField (std::vector< Vector2i > &field, const std::string &fieldName, IJson &main, IJson *templ=nullptr) |
template<typename T > | |
bool | readField (T &field, const std::string &fieldName, IJson &main, IJson *templ=nullptr) |
bool | readVector (Vector2i &field, const std::string &fieldNameX, const std::string &fieldNameY, IJson &main, IJson *templ=nullptr) |
void | readProperties (tson::PropertyCollection &properties, IJson &json, tson::Map *map) |
void | readGid (uint32_t &gid, TileFlipFlags &flags, IJson &main, IJson *templ=nullptr) |
typedef Color<float> tson::Colorf |
typedef Color<uint8_t> tson::Colori |
using tson::LinkedFileParser = typedef std::function<std::unique_ptr<IJson>(std::string relativePath)> |
typedef Vector2<float> tson::Vector2f |
typedef Vector2<int> tson::Vector2i |
|
strong |
|
strong |
Tileset.hpp - FillMode - From Tiled v1.9
Enumerator | |
---|---|
Undefined | |
Stretch | |
PreserveAspectFit |
|
strong |
Layer.hpp - LayerType //'type': tilelayer, objectgroup, imagelayer or group
Enumerator | |
---|---|
Undefined | |
TileLayer | |
ObjectGroup | |
ImageLayer | |
Group |
|
strong |
Tileset.hpp - ObjectAlignment
Enumerator | |
---|---|
Unspecified | |
TopLeft | |
Top | |
TopRight | |
Left | |
Center | |
Right | |
BottomLeft | |
Bottom | |
BottomRight |
|
strong |
Object.hpp - ObjectType
Enumerator | |
---|---|
Undefined | |
Object | |
Ellipse | |
Rectangle | |
Point | |
Polygon | |
Polyline | |
Text | |
Template |
|
strong |
Map.hpp - ParseStatus
Enumerator | |
---|---|
OK | |
FileNotFound | |
ParseError | |
MissingData | |
DecompressionError |
|
strong |
Text.hpp - TextAlignment
Enumerator | |
---|---|
Unresolved | |
Left | |
Center | |
Right | |
Justify | |
Top | |
Bottom |
|
strong |
Object.hpp - ObjectFlipFlags
Enumerator | |
---|---|
None | |
Diagonally | |
Vertically | |
Horizontally |
|
strong |
Tileset.hpp - TileRenderSize - From Tiled v1.9
Enumerator | |
---|---|
Undefined | |
Tile | |
Grid |
|
strong |
Type used in Property.hpp
Enumerator | |
---|---|
Undefined | |
Color | |
File | color |
Int | file |
Boolean | int |
Float | bool |
String | float |
Class | string |
Enum | class |
Object | 'string' or 'int' with a value in 'propertyType' |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type tson::operator& | ( | Enum | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & tson::operator&= | ( | Enum & | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type tson::operator^ | ( | Enum | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & tson::operator^= | ( | Enum & | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type tson::operator| | ( | Enum | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type & tson::operator|= | ( | Enum & | lhs, |
Enum | rhs | ||
) |
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type tson::operator~ | ( | Enum | rhs | ) |
|
inline |
Returns the requested IJson object if it exists in the map file or in a related template file
fieldName | The name of the field to check |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |
|
inline |
Attempts to read a series of coordinates from main file or the template if not overriden
fieldName | The name of the field to check |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |
bool tson::readField | ( | T & | field, |
const std::string & | fieldName, | ||
IJson & | main, | ||
IJson * | templ = nullptr |
||
) |
Attempts to read a field from main file or the template if not overriden
fieldName | The name of the field to check |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |
|
inline |
Attempts to read a text field from main file or the template if not overriden
fieldName | The name of the field to check |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |
|
inline |
Reads a gid, parsing flip-flags
properties | Target Properties collection to fill |
json | json node representing the map object |
map | Pointer to current map being parsed |
Reads a gid, parsing flip-flags
gid | Target gid to fill |
flags | Target flip flags to fill |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |
|
inline |
Reads all custom properties from the given json node
properties | Target Properties collection to fill |
json | json node representing the map object |
map | Pointer to current map being parsed |
|
inline |
Attempts to read a vector from main file or the template if not overriden
field | Target variable to fill |
fieldNameX | The name of the field to check for the x part of the vector |
fieldNameY | The name of the field to check for the y part of the vector |
main | The main json file being parsed |
templ | The template file json, if present, nullptr otherwise. |