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

#include <json11.h>

Inheritance diagram for json11::JsonArray:
Inheritance graph
Collaboration diagram for json11::JsonArray:
Collaboration graph

Public Member Functions

 JsonArray (const Json::array &value)
 
 JsonArray (Json::array &&value)
 

Private Member Functions

const Json::arrayarray_items () const override
 
const Jsonoperator[] (size_t i) const override
 

Additional Inherited Members

- Protected Member Functions inherited from json11::Value< Json::ARRAY, Json::array >
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::array value)
 
- Protected Member Functions inherited from json11::JsonValue
virtual bool bool_value () const
 
virtual int int_value () const
 
virtual long long long_value () const
 
virtual double number_value () const
 
virtual const Json::objectobject_items () const
 
virtual const Jsonoperator[] (const std::string &key) const
 
virtual const std::string & string_value () const
 
virtual Json::Type type () const =0
 
virtual ~JsonValue ()=default
 
- Protected Attributes inherited from json11::Value< Json::ARRAY, Json::array >
const Json::array m_value
 

Detailed Description

Definition at line 464 of file json11.h.

Constructor & Destructor Documentation

◆ JsonArray() [1/2]

json11::JsonArray::JsonArray ( const Json::array value)
inlineexplicit

Definition at line 471 of file json11.h.

471 : Value(value) {}

◆ JsonArray() [2/2]

json11::JsonArray::JsonArray ( Json::array &&  value)
inlineexplicit

Definition at line 472 of file json11.h.

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

Member Function Documentation

◆ array_items()

const Json::array& json11::JsonArray::array_items ( ) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 465 of file json11.h.

465  {
466  return m_value;
467  }

References json11::Value< Json::ARRAY, Json::array >::m_value.

◆ operator[]()

const Json & json11::JsonArray::operator[] ( size_t  i) const
inlineoverrideprivatevirtual

Reimplemented from json11::JsonValue.

Definition at line 599 of file json11.h.

599  {
600  if (i >= m_value.size()) {
601  return static_null();
602  }
603  return m_value[i];
604 }

References i, json11::Value< Json::ARRAY, Json::array >::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::ARRAY, Json::array >::Value
Value(Json::array value)
Definition: json11.h:382
i
size_t i
Definition: json11.h:663
json11::Value< Json::ARRAY, Json::array >::m_value
const Json::array m_value
Definition: json11.h:397