KiCad PCB EDA Suite
json11::JsonArray Class Referencefinal
Inheritance diagram for json11::JsonArray:
json11::Value< Json::ARRAY, Json::array >

Public Member Functions

 JsonArray (const Json::array &value)
 
 JsonArray (Json::array &&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::array m_value
 

Private Member Functions

const Json::array & array_items () const override
 
const Json & operator[] (size_t i) const override
 

Detailed Description

Definition at line 284 of file json11.cpp.

Constructor & Destructor Documentation

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

Definition at line 290 of file json11.cpp.

290 : Value( value ) {}
Value(const Json::array &value)
Definition: json11.cpp:209
json11::JsonArray::JsonArray ( Json::array &&  value)
inlineexplicit

Definition at line 291 of file json11.cpp.

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

Member Function Documentation

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

Definition at line 286 of file json11.cpp.

References i.

286 { return m_value; }
void json11::Value< tag, Json::array >::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::array >::equals ( const JsonValue< Json::ARRAY, Json::array > *  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::array >::less ( const JsonValue< Json::ARRAY, Json::array > *  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 & json11::JsonArray::operator[] ( size_t  i) const
overrideprivate

Definition at line 519 of file json11.cpp.

References i, operator<(), operator==(), and json11::static_null().

520 {
521  if( i >= m_value.size() )
522  return static_null();
523  else
524  return m_value[i];
525 }
static const Json & static_null()
Definition: json11.cpp:332
size_t i
Definition: json11.cpp:597
Json::Type json11::Value< tag, Json::array >::type ( ) const
inlineoverrideprotectedinherited

Definition at line 213 of file json11.cpp.

214  {
215  return tag;
216  }

Member Data Documentation

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

Definition at line 229 of file json11.cpp.


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