Replaced public inheritance by protected and private

This commit is contained in:
Benoit Blanchon
2014-07-19 14:41:29 +02:00
parent b278d7711b
commit e94575b4b8
12 changed files with 58 additions and 55 deletions

View File

@ -15,7 +15,7 @@ namespace ArduinoJson
{
class JsonObject;
class JsonArray : public JsonToken
class JsonArray : JsonValue
{
public:
@ -23,8 +23,8 @@ namespace ArduinoJson
{
}
JsonArray(JsonToken token)
: JsonToken(token)
JsonArray(JsonValue value)
: JsonValue(value)
{
}
@ -38,10 +38,7 @@ namespace ArduinoJson
return isArray() ? JsonToken::size() : 0;
}
JsonValue operator[](int index)
{
return getValue(index);
}
JsonValue operator[](int index);
JsonArrayIterator begin()
{
@ -60,34 +57,30 @@ namespace ArduinoJson
DEPRECATED JsonArray getArray(int index)
{
return getValue(index);
return operator[](index);
}
DEPRECATED bool getBool(int index)
{
return getValue(index);
return operator[](index);
}
DEPRECATED double getDouble(int index)
{
return getValue(index);
return operator[](index);
}
DEPRECATED JsonObject getHashTable(int index);
DEPRECATED long getLong(int index)
{
return getValue(index);
return operator[](index);
}
DEPRECATED char* getString(int index)
{
return getValue(index);
return operator[](index);
}
private:
JsonValue getValue(int index);
};
}
}