forked from bblanchon/ArduinoJson
Extracting a common base class for JsonArray and JsonObject...
This commit is contained in:
1 parent
ebb591ef28
commit
7d73e63c78
6 files changed
+29
-37
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Copyright Benoit Blanchon 2014
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include "../../include/ArduinoJson/Internals/List.hpp"
|
||||
|
||||
#include "../../include/ArduinoJson/JsonPair.hpp"
|
||||
#include "../../include/ArduinoJson/JsonVariant.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
||||
template <typename T>
|
||||
int List<T>::size() const {
|
||||
int nodeCount = 0;
|
||||
for (node_type *node = _firstNode; node; node = node->next) nodeCount++;
|
||||
return nodeCount;
|
||||
}
|
||||
|
||||
template class List<JsonPair>;
|
||||
template class List<JsonVariant>;
|
||||
Reference in new issue
Block a user