Tileson  1.3.0
A helpful json parser for Tiled maps
Public Member Functions | Static Public Member Functions | List of all members
tson::Tools Class Reference

#include <Tools.hpp>

Public Member Functions

 Tools ()=delete
 
 ~Tools ()=delete
 

Static Public Member Functions

static std::vector< uint8_t > Base64DecodedStringToBytes (std::string_view str)
 
static std::vector< uint32_t > BytesToUnsignedInts (const std::vector< uint8_t > &bytes)
 

Constructor & Destructor Documentation

◆ Tools()

tson::Tools::Tools ( )
delete

◆ ~Tools()

tson::Tools::~Tools ( )
delete

Member Function Documentation

◆ Base64DecodedStringToBytes()

std::vector< uint8_t > tson::Tools::Base64DecodedStringToBytes ( std::string_view  str)
inlinestatic

When you have decoded a Base64 string, you'll get a string representing bytes. This function turns them into actual bytes.

Parameters
str
Returns

◆ BytesToUnsignedInts()

std::vector< uint32_t > tson::Tools::BytesToUnsignedInts ( const std::vector< uint8_t > &  bytes)
inlinestatic

Converts bytes into unsigned int values. The bytes are converted in the Little Endian byte order to fit Tiled's specs.

Parameters
bytesA vector of bytes.
Returns
Bytes converted to unsigned ints

The documentation for this class was generated from the following file: