configor.hpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (c) 2018-2020 configor - Nomango
  2. //
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and associated documentation files (the "Software"), to deal
  5. // in the Software without restriction, including without limitation the rights
  6. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. // copies of the Software, and to permit persons to whom the Software is
  8. // furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. // THE SOFTWARE.
  20. #pragma once
  21. #include "configor_conversion.hpp"
  22. #include "configor_parser.hpp"
  23. #include "configor_serializer.hpp"
  24. #include "configor_wrapper.hpp"
  25. #include <cstdint> // std::int64_t
  26. #include <map> // std::map
  27. #include <string> // std::string
  28. #include <vector> // std::vector
  29. namespace configor
  30. {
  31. struct value_tplargs
  32. {
  33. using boolean_type = bool;
  34. using integer_type = int64_t;
  35. using float_type = double;
  36. using char_type = char;
  37. template <class _CharTy, class... _Args>
  38. using string_type = std::basic_string<_CharTy, _Args...>;
  39. template <class _Kty, class... _Args>
  40. using array_type = std::vector<_Kty, _Args...>;
  41. template <class _Kty, class _Ty, class... _Args>
  42. using object_type = std::map<_Kty, _Ty, _Args...>;
  43. template <class _Ty>
  44. using allocator_type = std::allocator<_Ty>;
  45. template <class _Ty>
  46. using binder_type = value_binder<_Ty>;
  47. };
  48. struct wvalue_tplargs : value_tplargs
  49. {
  50. using char_type = wchar_t;
  51. };
  52. using value = basic_value<value_tplargs>;
  53. using wvalue = basic_value<wvalue_tplargs>;
  54. } // namespace configor