JsonValue.h 857 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "Internals/JsonNodeWrapper.h"
  3. class JsonArray;
  4. class JsonContainer;
  5. class JsonObject;
  6. class JsonValue : public JsonNodeWrapper
  7. {
  8. public:
  9. JsonValue() {}
  10. explicit JsonValue(JsonNode* node)
  11. : JsonNodeWrapper(node)
  12. {
  13. }
  14. void operator=(bool);
  15. void operator=(const char*);
  16. void operator=(double x) { set(x, 2); }
  17. void operator=(int);
  18. void operator=(const JsonValue& value) { duplicate(value); }
  19. void operator=(const JsonNodeWrapper& object) { duplicate(object); }
  20. operator bool() const;
  21. operator const char*() const;
  22. operator double() const;
  23. operator long() const;
  24. operator int() const { return operator long(); }
  25. operator JsonArray() const;
  26. operator JsonObject() const;
  27. void set(double value, int decimals);
  28. };