KiCad PCB EDA Suite
json11::JsonObject Class Referencefinal
Inheritance diagram for json11::JsonObject:
json11::Value< Json::OBJECT, Json::object >

Public Member Functions

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

Protected Member Functions

Json::Type type () const override
 
bool equals (const JsonValue *other) const override
 
bool less (const JsonValue *other) const override
 
void dump (string &out) const override
 

Protected Attributes

const Json::object m_value
 

Private Member Functions

const Json::object & object_items () const override
 
const Json & operator[] (const string &key) const override
 

Detailed Description

Definition at line 294 of file json11.cpp.

Constructor & Destructor Documentation

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

Definition at line 300 of file json11.cpp.

300 : Value( value ) {}
Value(const Json::object &value)
Definition: json11.cpp:209
json11::JsonObject::JsonObject ( Json::object &&  value)
inlineexplicit

Definition at line 301 of file json11.cpp.

301 : Value( move( value ) ) {}
Value(const Json::object &value)
Definition: json11.cpp:209

Member Function Documentation

void json11::Value< tag, Json::object >::dump ( string &  out) const
inlineoverrideprotectedinherited

Definition at line 230 of file json11.cpp.

230 { json11::dump( m_value, out ); }
static void dump(NullStruct, string &out)
Definition: json11.cpp:53
bool json11::Value< tag, Json::object >::equals ( const JsonValue< Json::OBJECT, Json::object > *  other) const
inlineoverrideprotectedinherited

Definition at line 219 of file json11.cpp.

220  {
221  return m_value == static_cast<const Value<tag, T>*>(other)->m_value;
222  }
bool json11::Value< tag, Json::object >::less ( const JsonValue< Json::OBJECT, Json::object > *  other) const
inlineoverrideprotectedinherited

Definition at line 224 of file json11.cpp.

225  {
226  return m_value < static_cast<const Value<tag, T>*>(other)->m_value;
227  }
const Json::object& json11::JsonObject::object_items ( ) const
inlineoverrideprivate

Definition at line 296 of file json11.cpp.

296 { return m_value; }
const Json & json11::JsonObject::operator[] ( const string &  key) const
overrideprivate

Definition at line 511 of file json11.cpp.

References json11::static_null().

512 {
513  auto iter = m_value.find( key );
514 
515  return ( iter == m_value.end() ) ? static_null() : iter->second;
516 }
static const Json & static_null()
Definition: json11.cpp:332
Json::Type json11::Value< tag, Json::object >::type ( ) const
inlineoverrideprotectedinherited

Definition at line 213 of file json11.cpp.

214  {
215  return tag;
216  }

Member Data Documentation

const Json::object json11::Value< tag, Json::object >::m_value
protectedinherited

Definition at line 229 of file json11.cpp.


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