選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

47 行
992 B

  1. #pragma once
  2. #include <set>
  3. #include <cpphibernate/config.h>
  4. namespace cpphibernate {
  5. namespace mariadb {
  6. namespace __impl
  7. {
  8. /**
  9. * @brief Helper class to create attributes type.
  10. */
  11. template<typename X, typename = void>
  12. struct attributes_builder;
  13. }
  14. /**
  15. * @brief Attributes enumeration
  16. */
  17. enum class attribute_t
  18. {
  19. hex, //!< The field is stored hex encoded.
  20. compress, //!< The field is stored compressed.
  21. primary_key, //!< The field is the primary key.
  22. };
  23. /**
  24. * @brief Set of attributes.
  25. */
  26. struct attributes_t :
  27. public std::set<attribute_t>
  28. {
  29. using base_type = std::set<attribute_t>;
  30. using base_type::base_type;
  31. };
  32. /**
  33. * @brief Predicate to create attributes set from attributes schema.
  34. */
  35. constexpr decltype(auto) make_attributes = mp::generic_predicate<__impl::attributes_builder> { };
  36. } }