properties.h 528 B

1234567891011121314151617181920212223242526
  1. //
  2. // properties.hpp
  3. // logger
  4. //
  5. // Created by Sam Jaffe on 10/3/15.
  6. //
  7. //
  8. #pragma once
  9. #include <map>
  10. #include <string>
  11. #include <vector>
  12. namespace logging {
  13. struct properties {
  14. operator std::string const &() const;
  15. properties const & operator[](std::size_t idx) const;
  16. properties const & operator[](std::string const & key) const;
  17. const enum { STRING, OBJECT, ARRAY } type;
  18. const std::map<std::string, properties> obj;
  19. const std::vector<properties> array;
  20. const std::string value;
  21. };
  22. }