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

#include <json11.h>

Inheritance diagram for json11::JsonObject:
Inheritance graph
Collaboration diagram for json11::JsonObject:
Collaboration graph

Public Member Functions

 JsonObject (const Json::object &value)
 
 JsonObject (Json::object &&value)
 

Private Member Functions

const Json::objectobject_items () const override
 
const Jsonoperator[] (const std::string &key) const override
 

Additional Inherited Members

- Protected Member Functions inherited from json11::Value< Json::OBJECT, Json::object >
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 (Json::object value)
 
- Protected Member Functions inherited from json11::JsonValue
virtual const Json::arrayarray_items () const
 
virtual bool bool_value () const
 
virtual int int_value () const
 
virtual long long long_value () const
 
virtual double number_value () 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::OBJECT, Json::object >
const Json::object m_value
 

Detailed Description

Definition at line 475 of file json11.h.

Constructor & Destructor Documentation

◆ JsonObject() [1/2]

json11::JsonObject::JsonObject ( const Json::object value)
inlineexplicit

Definition at line 482 of file json11.h.

482 : Value(value) {}

◆ JsonObject() [2/2]

json11::JsonObject::JsonObject ( Json::object &&  value)
inlineexplicit

Definition at line 483 of file json11.h.

483 : Value(std::move(value)) {}

Member Function Documentation

◆ object_items()

const Json::object& json11::JsonObject::object_items ( ) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 476 of file json11.h.

476  {
477  return m_value;
478  }

References json11::Value< Json::OBJECT, Json::object >::m_value.

◆ operator[]()

const Json & json11::JsonObject::operator[] ( const std::string &  key) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 595 of file json11.h.

595  {
596  auto iter = m_value.find(key);
597  return (iter == m_value.end()) ? static_null() : iter->second;
598 }

References json11::Value< Json::OBJECT, Json::object >::m_value, and json11::static_null().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
json11::static_null
static const Json & static_null()
Definition: json11.h:509
json11::Value< Json::OBJECT, Json::object >::Value
Value(Json::object value)
Definition: json11.h:382
json11::Value< Json::OBJECT, Json::object >::m_value
const Json::object m_value
Definition: json11.h:397