19#ifndef CPPREALM_BRIDGE_PROPERTY_HPP
20#define CPPREALM_BRIDGE_PROPERTY_HPP
24#include <cpprealm/internal/bridge/utils.hpp>
30namespace realm::internal::bridge {
34 enum class type :
unsigned short {
57 Collection = Array | Set | Dictionary,
58 Flags = Nullable | Collection
63 property& operator=(
const property& other);
65 property &operator=(
property &&other)
noexcept;
73 const std::string& object_name);
74 operator Property()
const;
75 void set_object_link(
const std::string&);
76 void set_origin_property_name(
const std::string&);
78 void set_primary_key(
bool);
79 bool is_primary()
const;
80 std::string name()
const;
81 [[nodiscard]]
col_key column_key()
const;
83#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
84 storage::Property m_property[1];
86 std::shared_ptr<Property> m_property;
92 constexpr auto to_underlying(E e)
94 return static_cast<typename std::underlying_type<E>::type
>(e);
97 inline constexpr property::type operator|(property::type a, property::type b)
99 return static_cast<property::type
>(to_underlying(a) | to_underlying(b));
101 inline constexpr property::type operator&(property::type a, property::type b)
103 return static_cast<property::type
>(to_underlying(a) & to_underlying(b));
106 inline constexpr bool property_has_flag(property::type property, property::type flag) {
107 return static_cast<bool>(
property & flag);
Definition: col_key.hpp:28
Definition: property.hpp:33