#include <RSJparser.hpp>
Public Member Functions | |
RSJresource () | |
RSJresource (std::string str) | |
RSJresource (const char *str) | |
template<class dataType > | |
RSJresource (dataType d) | |
RSJresource (std::istream &is) | |
RSJresource (std::ifstream &ifs) | |
~RSJresource () | |
RSJresource (const RSJresource &r) | |
RSJresource & | operator= (const RSJresource &r) |
RSJresourceType | parse (bool force=false) |
void | parse_full (bool force=false, int max_depth=INT_MAX, int *parse_count_for_verbose_p=NULL) |
void | fast_parse (std::string *str_p=NULL, bool copy_string=false, int max_depth=INT_MAX, size_t *parse_start_str_pos=NULL) |
RSJobject & | as_object (bool force=false) |
RSJarray & | as_array (bool force=false) |
int | size (void) |
std::string & | raw_data (void) |
bool | exists (void) |
bool | is_parsed (void) |
RSJresourceType | type (void) |
std::string | as_str (bool print_comments=false, bool update_data=true) |
void | print (bool print_comments=false, bool update_data=true) |
RSJresource & | operator[] (std::string key) |
RSJresource & | operator[] (unsigned int indx) |
template<class dataType > | |
dataType | as (const dataType &def=dataType()) |
template<class dataType , class vectorType = std::vector<dataType>> | |
vectorType | as_vector (const vectorType &def=vectorType()) |
template<class dataType , class mapType = std::unordered_map<std::string,dataType>> | |
mapType | as_map (const mapType &def=mapType()) |
template<> | |
RSJobject | as (const RSJobject &def) |
template<> | |
RSJarray | as (const RSJarray &def) |
template<> | |
int | as (const int &def) |
template<> | |
double | as (const double &def) |
template<> | |
bool | as (const bool &def) |
Private Attributes | |
std::string | data |
bool | _exists |
RSJparsedData * | parsed_data_p |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
RSJresource::~RSJresource | ( | ) |
RSJresource::RSJresource | ( | const RSJresource & | r | ) |
|
inline |
|
inline |
|
inline |
|
inline |
RSJarray & RSJresource::as_array | ( | bool | force = false | ) |
mapType RSJresource::as_map | ( | const mapType & | def = mapType() | ) |
RSJobject & RSJresource::as_object | ( | bool | force = false | ) |
std::string RSJresource::as_str | ( | bool | print_comments = false , |
bool | update_data = true |
||
) |
vectorType RSJresource::as_vector | ( | const vectorType & | def = vectorType() | ) |
|
inline |
void RSJresource::fast_parse | ( | std::string * | str_p = NULL , |
bool | copy_string = false , |
||
int | max_depth = INT_MAX , |
||
size_t * | parse_start_str_pos = NULL |
||
) |
|
inline |
RSJresource & RSJresource::operator= | ( | const RSJresource & | r | ) |
RSJresource & RSJresource::operator[] | ( | std::string | key | ) |
RSJresource & RSJresource::operator[] | ( | unsigned int | indx | ) |
RSJresourceType RSJresource::parse | ( | bool | force = false | ) |
void RSJresource::parse_full | ( | bool | force = false , |
int | max_depth = INT_MAX , |
||
int * | parse_count_for_verbose_p = NULL |
||
) |
|
inline |
|
inline |
int RSJresource::size | ( | void | ) |
RSJresourceType RSJresource::type | ( | void | ) |
|
private |
|
private |
|
private |