-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjson_array_impl.cpp
More file actions
40 lines (28 loc) · 1 KB
/
json_array_impl.cpp
File metadata and controls
40 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "json/impl/json_array_impl.hpp"
#include "json/impl/json_value_impl.hpp"
//------------------------------------------------------------------------------
namespace json
{
//------------------------------------------------------------------------------
JsonArrayImpl::JsonArrayImpl( JsonImpl && _jsonImpl )
: m_jsonImpl( std::move( _jsonImpl ) )
{
}
//------------------------------------------------------------------------------
JsonArrayImpl::ArrayIndex JsonArrayImpl::getSize() const
{
return m_jsonImpl.size();
}
//------------------------------------------------------------------------------
bool JsonArrayImpl::empty() const
{
return m_jsonImpl.empty();
}
//------------------------------------------------------------------------------
JsonArrayImpl::JsonValuePtr JsonArrayImpl::at( ArrayIndex _index ) const
{
JsonImpl json = m_jsonImpl[_index];
return JsonValuePtr{ new JsonValueImpl{ std::move( json ) } };
}
//------------------------------------------------------------------------------
}