|
| Json11 (const json11::Json &json) |
|
bool | any (std::string_view key) const override |
|
std::vector< std::unique_ptr< IJson > > | array () override |
|
std::vector< std::unique_ptr< IJson > > & | array (std::string_view key) override |
|
IJson & | at (size_t pos) override |
|
IJson & | at (std::string_view key) override |
|
size_t | count (std::string_view key) const override |
|
fs::path | directory () const override |
|
void | directory (const fs::path &directory) override |
|
bool | isArray () const override |
|
bool | isNull () const override |
|
bool | isObject () const override |
|
IJson & | operator[] (std::string_view key) override |
|
bool | parse (const fs::path &path) override |
|
bool | parse (const void *data, size_t size) override |
|
size_t | size () const override |
|
virtual | ~IJson ()=default |
|
virtual bool | any (std::string_view key) const =0 |
|
virtual std::vector< std::unique_ptr< IJson > > | array ()=0 |
|
virtual std::vector< std::unique_ptr< IJson > > & | array (std::string_view key)=0 |
|
virtual IJson & | at (size_t pos)=0 |
|
virtual IJson & | at (std::string_view key)=0 |
|
virtual size_t | count (std::string_view key) const =0 |
|
virtual fs::path | directory () const =0 |
|
virtual void | directory (const fs::path &directory)=0 |
|
template<typename T > |
T | get () |
|
template<typename T > |
T | get (std::string_view key) |
|
virtual bool | isArray () const =0 |
|
virtual bool | isNull () const =0 |
|
virtual bool | isObject () const =0 |
|
virtual IJson & | operator[] (std::string_view key)=0 |
|
virtual bool | parse (const fs::path &path)=0 |
|
virtual bool | parse (const void *data, size_t size)=0 |
|
virtual size_t | size () const =0 |
|
|
bool | getBool () override |
|
bool | getBool (std::string_view key) override |
|
double | getDouble () override |
|
double | getDouble (std::string_view key) override |
|
float | getFloat () override |
|
float | getFloat (std::string_view key) override |
|
int32_t | getInt32 () override |
|
int32_t | getInt32 (std::string_view key) override |
|
int64_t | getInt64 () override |
|
int64_t | getInt64 (std::string_view key) override |
|
std::string | getString () override |
|
std::string | getString (std::string_view key) override |
|
uint32_t | getUInt32 () override |
|
uint32_t | getUInt32 (std::string_view key) override |
|
uint64_t | getUInt64 () override |
|
uint64_t | getUInt64 (std::string_view key) override |
|
virtual bool | getBool ()=0 |
|
virtual bool | getBool (std::string_view key)=0 |
|
virtual double | getDouble ()=0 |
|
virtual double | getDouble (std::string_view key)=0 |
|
virtual float | getFloat ()=0 |
|
virtual float | getFloat (std::string_view key)=0 |
|
virtual int32_t | getInt32 ()=0 |
|
virtual int32_t | getInt32 (std::string_view key)=0 |
|
virtual int64_t | getInt64 ()=0 |
|
virtual int64_t | getInt64 (std::string_view key)=0 |
|
virtual std::string | getString ()=0 |
|
virtual std::string | getString (std::string_view key)=0 |
|
virtual uint32_t | getUInt32 ()=0 |
|
virtual uint32_t | getUInt32 (std::string_view key)=0 |
|
virtual uint64_t | getUInt64 ()=0 |
|
virtual uint64_t | getUInt64 (std::string_view key)=0 |
|
|
std::map< std::string, std::unique_ptr< IJson > > | m_arrayCache |
|
std::map< std::string, std::vector< std::unique_ptr< IJson > > > | m_arrayListDataCache |
|
std::map< size_t, std::unique_ptr< IJson > > | m_arrayPosCache |
|
std::unique_ptr< json11::Json > | m_data = nullptr |
|
const json11::Json * | m_json = nullptr |
|
fs::path | m_path |
|
◆ any()
bool tson::Json11::any |
( |
std::string_view |
key | ) |
const |
|
inlineoverridevirtual |
◆ array() [1/2]
std::vector< std::unique_ptr< IJson > > tson::Json11::array |
( |
| ) |
|
|
inlineoverridevirtual |
If current json object is an array, this will get all elements of it!
- Returns
- An array
Implements tson::IJson.
◆ array() [2/2]
std::vector< std::unique_ptr< IJson > > & tson::Json11::array |
( |
std::string_view |
key | ) |
|
|
inlineoverridevirtual |
◆ at() [1/2]
IJson & tson::Json11::at |
( |
size_t |
pos | ) |
|
|
inlineoverridevirtual |
◆ at() [2/2]
IJson & tson::Json11::at |
( |
std::string_view |
key | ) |
|
|
inlineoverridevirtual |
◆ count()
size_t tson::Json11::count |
( |
std::string_view |
key | ) |
const |
|
inlineoverridevirtual |
◆ directory() [1/2]
fs::path tson::Json11::directory |
( |
| ) |
const |
|
inlineoverridevirtual |
Get the directory where the json was loaded. Only assigned if json is parsed by file.
- Returns
Implements tson::IJson.
◆ directory() [2/2]
void tson::Json11::directory |
( |
const fs::path & |
directory | ) |
|
|
inlineoverridevirtual |
◆ getBool() [1/2]
bool tson::Json11::getBool |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getBool() [2/2]
bool tson::Json11::getBool |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getDouble() [1/2]
double tson::Json11::getDouble |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getDouble() [2/2]
double tson::Json11::getDouble |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getFloat() [1/2]
float tson::Json11::getFloat |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getFloat() [2/2]
float tson::Json11::getFloat |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getInt32() [1/2]
int32_t tson::Json11::getInt32 |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getInt32() [2/2]
int32_t tson::Json11::getInt32 |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getInt64() [1/2]
int64_t tson::Json11::getInt64 |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getInt64() [2/2]
int64_t tson::Json11::getInt64 |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getString() [1/2]
std::string tson::Json11::getString |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getString() [2/2]
std::string tson::Json11::getString |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getUInt32() [1/2]
uint32_t tson::Json11::getUInt32 |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getUInt32() [2/2]
uint32_t tson::Json11::getUInt32 |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ getUInt64() [1/2]
uint64_t tson::Json11::getUInt64 |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getUInt64() [2/2]
uint64_t tson::Json11::getUInt64 |
( |
std::string_view |
key | ) |
|
|
inlineoverrideprotectedvirtual |
◆ isArray()
bool tson::Json11::isArray |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isNull()
bool tson::Json11::isNull |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isObject()
bool tson::Json11::isObject |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ operator[]()
IJson & tson::Json11::operator[] |
( |
std::string_view |
key | ) |
|
|
inlineoverridevirtual |
◆ parse() [1/2]
bool tson::Json11::parse |
( |
const fs::path & |
path | ) |
|
|
inlineoverridevirtual |
◆ parse() [2/2]
bool tson::Json11::parse |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inlineoverridevirtual |
◆ size()
size_t tson::Json11::size |
( |
| ) |
const |
|
inlineoverridevirtual |
Get the size of an object. This will be equal to the number of variables an object contains.
- Returns
Implements tson::IJson.
The documentation for this class was generated from the following file: