Apache Mesos
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
JSON::Number Struct Reference

#include <json.hpp>

Public Types

enum  Type { FLOATING, SIGNED_INTEGER, UNSIGNED_INTEGER }
 

Public Member Functions

 Number ()
 
template<typename T >
 Number (T _value, typename std::enable_if< std::is_floating_point< T >::value, int >::type=0)
 
template<typename T >
 Number (T _value, typename std::enable_if< std::is_integral< T >::value &&std::is_signed< T >::value, int >::type=0)
 
template<typename T >
 Number (T _value, typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value, int >::type=0)
 
template<typename T >
as () const
 

Public Attributes

enum JSON::Number::Type type
 
double value
 
int64_t signed_integer
 
uint64_t unsigned_integer
 

Friends

struct Value
 
struct Comparator
 
void json (NumberWriter *writer, const Number &number)
 

Member Enumeration Documentation

Enumerator
FLOATING 
SIGNED_INTEGER 
UNSIGNED_INTEGER 

Constructor & Destructor Documentation

JSON::Number::Number ( )
inline
template<typename T >
JSON::Number::Number ( _value,
typename std::enable_if< std::is_floating_point< T >::value, int >::type  = 0 
)
inline
template<typename T >
JSON::Number::Number ( _value,
typename std::enable_if< std::is_integral< T >::value &&std::is_signed< T >::value, int >::type  = 0 
)
inline
template<typename T >
JSON::Number::Number ( _value,
typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value, int >::type  = 0 
)
inline

Member Function Documentation

template<typename T >
T JSON::Number::as ( ) const
inline

Friends And Related Function Documentation

friend struct Comparator
friend
void json ( NumberWriter writer,
const Number number 
)
friend
friend struct Value
friend

Member Data Documentation

int64_t JSON::Number::signed_integer
enum JSON::Number::Type JSON::Number::type
uint64_t JSON::Number::unsigned_integer
double JSON::Number::value

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