|
21 | 21 |
|
22 | 22 | #defineFIREBASE_JSONBUFFER_SIZE200
|
23 | 23 |
|
| 24 | +/** |
| 25 | + * Represents value stored in firebase, may be a singular value (leaf node) or |
| 26 | + * a tree structure. |
| 27 | +*/ |
24 | 28 | classFirebaseObject {
|
25 | 29 | public:
|
| 30 | +/** |
| 31 | + * Construct from json. |
| 32 | + * \param data Json formatted string. |
| 33 | +*/ |
26 | 34 | FirebaseObject(const String& data);
|
| 35 | + |
| 36 | +/** |
| 37 | + * Interpret result as a bool, only applicable if result is a single element |
| 38 | + * and not a tree. |
| 39 | +*/ |
27 | 40 | operatorbool();
|
| 41 | + |
| 42 | +/** |
| 43 | + * Interpret result as a int, only applicable if result is a single element |
| 44 | + * and not a tree. |
| 45 | +*/ |
28 | 46 | operatorint();
|
| 47 | + |
| 48 | +/** |
| 49 | + * Interpret result as a float, only applicable if result is a single element |
| 50 | + * and not a tree. |
| 51 | +*/ |
29 | 52 | operatorfloat();
|
| 53 | + |
| 54 | +/** |
| 55 | + * Interpret result as a String, only applicable if result is a single element |
| 56 | + * and not a tree. |
| 57 | +*/ |
30 | 58 | operatorconst String&();
|
| 59 | + |
| 60 | +/** |
| 61 | + * Interpret result as a JsonObject, if the result is a tree use this or the |
| 62 | + * operator[] methods below. |
| 63 | +*/ |
31 | 64 | operatorconst JsonObject&();
|
| 65 | + |
| 66 | +//TODO(proppy): Add comments to these. |
32 | 67 | JsonObjectSubscript<constchar*>operator[](constchar* key);
|
33 | 68 | JsonObjectSubscript<const String&>operator[](const String& key);
|
34 | 69 | JsonVariantoperator[](JsonObjectKey key)const;
|
|