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

#include <json11.h>

Inheritance diagram for json11::JsonInt:
Inheritance graph
Collaboration diagram for json11::JsonInt:
Collaboration graph

Public Member Functions

 JsonInt (int 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, long long >
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 (long long 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, long long >
const long long m_value
 

Detailed Description

Definition at line 424 of file json11.h.

Constructor & Destructor Documentation

◆ JsonInt()

json11::JsonInt::JsonInt ( int  value)
inlineexplicit

Definition at line 442 of file json11.h.

442 : Value(value) {}

Member Function Documentation

◆ equals()

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

Implements json11::JsonValue.

Definition at line 434 of file json11.h.

434  {
435  return m_value == other->number_value();
436  }

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

Here is the call graph for this function:

◆ int_value()

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

Reimplemented from json11::JsonValue.

Definition at line 428 of file json11.h.

428  {
429  return m_value;
430  }

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

◆ less()

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

Implements json11::JsonValue.

Definition at line 437 of file json11.h.

437  {
438  return m_value < other->number_value();
439  }

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

Here is the call graph for this function:

◆ long_value()

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

Reimplemented from json11::JsonValue.

Definition at line 431 of file json11.h.

431  {
432  return static_cast<long long>(m_value);
433  }

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

◆ number_value()

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

Reimplemented from json11::JsonValue.

Definition at line 425 of file json11.h.

425  {
426  return m_value;
427  }

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


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