json/tree: move some array methods to cpp
This commit is contained in:
parent
f333c75218
commit
1d0240ba10
@ -534,6 +534,22 @@ json::tree::array::operator==(const json::tree::array &rhs) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
json::tree::array::operator== (const node &rhs) const
|
||||||
|
{
|
||||||
|
return rhs == *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
size_t
|
||||||
|
json::tree::array::size (void) const
|
||||||
|
{
|
||||||
|
return m_values.size ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
json::tree::node&
|
json::tree::node&
|
||||||
json::tree::array::operator[] (unsigned int idx)
|
json::tree::array::operator[] (unsigned int idx)
|
||||||
|
@ -173,11 +173,9 @@ namespace json { namespace tree {
|
|||||||
virtual type_t type (void) const { return ARRAY; }
|
virtual type_t type (void) const { return ARRAY; }
|
||||||
|
|
||||||
virtual bool operator==(const array &rhs) const;
|
virtual bool operator==(const array &rhs) const;
|
||||||
virtual bool operator==(const node &rhs) const
|
virtual bool operator==(const node &rhs) const;
|
||||||
{ return rhs == *this; }
|
|
||||||
|
|
||||||
virtual size_t size (void) const
|
virtual size_t size (void) const;
|
||||||
{ return m_values.size (); }
|
|
||||||
virtual node& operator [](unsigned int idx);
|
virtual node& operator [](unsigned int idx);
|
||||||
virtual const node& operator [](unsigned int idx) const;
|
virtual const node& operator [](unsigned int idx) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user