souffle  2.0.2-371-g6315b36
Public Member Functions | Private Member Functions
json11::JsonDouble Class Referencefinal

#include <json11.h>

Inheritance diagram for json11::JsonDouble:
Inheritance graph
Collaboration diagram for json11::JsonDouble:
Collaboration graph

Public Member Functions

 JsonDouble (double value)
 

Private Member Functions

bool equals (const JsonValue *other) const override
 
int int_value () const override
 
bool less (const JsonValue *other) const override
 
long long long_value () const override
 
double number_value () const override
 

Additional Inherited Members

- Protected Member Functions inherited from json11::Value< Json::NUMBER, double >
void dump (std::string &out) const override
 
bool equals (const JsonValue *other) const override
 
bool less (const JsonValue *other) const override
 
Json::Type type () const override
 
 Value (double value)
 
- Protected Member Functions inherited from json11::JsonValue
virtual const Json::arrayarray_items () const
 
virtual bool bool_value () const
 
virtual const Json::objectobject_items () const
 
virtual const Jsonoperator[] (const std::string &key) const
 
virtual const Jsonoperator[] (size_t i) const
 
virtual const std::string & string_value () const
 
virtual Json::Type type () const =0
 
virtual ~JsonValue ()=default
 
- Protected Attributes inherited from json11::Value< Json::NUMBER, double >
const double m_value
 

Detailed Description

Definition at line 403 of file json11.h.

Constructor & Destructor Documentation

◆ JsonDouble()

json11::JsonDouble::JsonDouble ( double  value)
inlineexplicit

Definition at line 421 of file json11.h.

421 : Value(value) {}

Member Function Documentation

◆ equals()

bool json11::JsonDouble::equals ( const JsonValue other) const
inlineoverrideprivatevirtual

Implements json11::JsonValue.

Definition at line 413 of file json11.h.

413  {
414  return m_value == other->number_value();
415  }

References json11::Value< Json::NUMBER, double >::m_value, and json11::JsonValue::number_value().

Here is the call graph for this function:

◆ int_value()

int json11::JsonDouble::int_value ( ) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 407 of file json11.h.

407  {
408  return static_cast<int>(m_value);
409  }

References json11::Value< Json::NUMBER, double >::m_value.

◆ less()

bool json11::JsonDouble::less ( const JsonValue other) const
inlineoverrideprivatevirtual

Implements json11::JsonValue.

Definition at line 416 of file json11.h.

416  {
417  return m_value < other->number_value();
418  }

References json11::Value< Json::NUMBER, double >::m_value, and json11::JsonValue::number_value().

Here is the call graph for this function:

◆ long_value()

long long json11::JsonDouble::long_value ( ) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 410 of file json11.h.

410  {
411  return static_cast<long long>(m_value);
412  }

References json11::Value< Json::NUMBER, double >::m_value.

◆ number_value()

double json11::JsonDouble::number_value ( ) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 404 of file json11.h.

404  {
405  return m_value;
406  }

References json11::Value< Json::NUMBER, double >::m_value.


The documentation for this class was generated from the following file:
json11::Value< Json::NUMBER, double >::Value
Value(double value)
Definition: json11.h:382
json11::Value< Json::NUMBER, double >::m_value
const double m_value
Definition: json11.h:397