MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
picojson.h File Reference
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstddef>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <stdexcept>
#include <string>
#include <vector>
#include <utility>
#include <math.h>
#include <locale.h>

Go to the source code of this file.

Classes

struct  picojson::null
 
class  picojson::value
 
union  picojson::value::_storage
 
struct  picojson::serialize_str_char< Iter >
 
class  picojson::input< Iter >
 
class  picojson::deny_parse_context
 
class  picojson::default_parse_context
 
class  picojson::null_parse_context
 
struct  picojson::null_parse_context::dummy_str
 
struct  picojson::last_error_t< T >
 

Namespaces

 picojson
 

Macros

#define PICOJSON_USE_RVALUE_REFERENCE   0
 
#define PICOJSON_USE_LOCALE   1
 
#define PICOJSON_ASSERT(e)
 
#define SNPRINTF   snprintf
 
#define INIT(p, v)
 
#define DEINIT(p)
 
#define INIT(p, v)
 
#define IS(ctype, jtype)
 
#define GET(ctype, var)
 
#define SET(ctype, jtype, setter)
 
#define MAP(val, sym)
 
#define MAP(sym, val)
 
#define IS(ch, text, op)
 
#define PICOJSON_CMP(type)
 

Typedefs

typedef value::array picojson::array
 
typedef value::object picojson::object
 

Enumerations

enum  {
  picojson::null_type, picojson::boolean_type, picojson::number_type, picojson::string_type,
  picojson::array_type, picojson::object_type
}
 
enum  { picojson::INDENT_WIDTH = 2 }
 

Functions

template<typename Iter >
void picojson::copy (const std::string &s, Iter oi)
 
template<typename Iter >
void picojson::serialize_str (const std::string &s, Iter oi)
 
template<typename Iter >
int picojson::_parse_quadhex (input< Iter > &in)
 
template<typename String , typename Iter >
bool picojson::_parse_codepoint (String &out, input< Iter > &in)
 
template<typename String , typename Iter >
bool picojson::_parse_string (String &out, input< Iter > &in)
 
template<typename Context , typename Iter >
bool picojson::_parse_array (Context &ctx, input< Iter > &in)
 
template<typename Context , typename Iter >
bool picojson::_parse_object (Context &ctx, input< Iter > &in)
 
template<typename Iter >
std::string picojson::_parse_number (input< Iter > &in)
 
template<typename Context , typename Iter >
bool picojson::_parse (Context &ctx, input< Iter > &in)
 
template<typename Iter >
std::string picojson::parse (value &out, Iter &pos, const Iter &last)
 
template<typename Context , typename Iter >
Iter picojson::_parse (Context &ctx, const Iter &first, const Iter &last, std::string *err)
 
template<typename Iter >
Iter picojson::parse (value &out, const Iter &first, const Iter &last, std::string *err)
 
std::string picojson::parse (value &out, const std::string &s)
 
std::string picojson::parse (value &out, std::istream &is)
 
void picojson::set_last_error (const std::string &s)
 
const std::string & picojson::get_last_error ()
 
bool picojson::operator== (const value &x, const value &y)
 
bool picojson::operator!= (const value &x, const value &y)
 
template<>
void std::swap (picojson::value &x, picojson::value &y)
 
std::istream & operator>> (std::istream &is, picojson::value &x)
 
std::ostream & operator<< (std::ostream &os, const picojson::value &x)
 

Macro Definition Documentation

#define DEINIT (   p)
Value:
case p##type: \
delete u_.p; \
break
#define GET (   ctype,
  var 
)
Value:
template <> inline const ctype &value::get<ctype>() const { \
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" && is<ctype>()); \
return var; \
} \
template <> inline ctype &value::get<ctype>() { \
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" && is<ctype>()); \
return var; \
}
#define PICOJSON_ASSERT(e)
Definition: picojson.h:86
#define INIT (   p,
 
)
Value:
case p##type: \
u_.p = v; \
break
#define INIT (   p,
 
)
Value:
case p##type: \
u_.p = v; \
break
#define IS (   ctype,
  jtype 
)
Value:
template <> inline bool value::is<ctype>() const { \
return type_ == jtype##_type; \
}
#define IS (   ch,
  text,
  op 
)
Value:
case ch: \
if (in.match(text) && op) { \
return true; \
} else { \
return false; \
}
#define MAP (   val,
  sym 
)
Value:
case val: \
copy(sym, oi); \
break
void copy(const std::string &s, Iter oi)
Definition: picojson.h:510
#define MAP (   sym,
  val 
)
Value:
case sym: \
out.push_back(val); \
break
#define PICOJSON_ASSERT (   e)
Value:
do { \
if (!(e)) \
throw std::runtime_error(#e); \
} while (0)
const double e
Definition: Meteoconst.h:66
#define PICOJSON_CMP (   type)
Value:
if (x.is<type>()) \
return y.is<type>() && x.get<type>() == y.get<type>()
#define PICOJSON_USE_LOCALE   1
#define PICOJSON_USE_RVALUE_REFERENCE   0
#define SET (   ctype,
  jtype,
  setter 
)
Value:
template <> inline void value::set<ctype>(const ctype &_val) { \
clear(); \
type_ = jtype##_type; \
setter \
}
#define SNPRINTF   snprintf

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const picojson::value x 
)
inline
std::istream& operator>> ( std::istream &  is,
picojson::value x 
)
inline