19#ifndef CPPREALM_MANAGED_TIMESTAMP_HPP
20#define CPPREALM_MANAGED_TIMESTAMP_HPP
22#include <cpprealm/internal/bridge/timestamp.hpp>
23#include <cpprealm/macros.hpp>
32 using value_type = std::chrono::time_point<std::chrono::system_clock>;
33 运用 托管 <std::Chrono::Time_Point<std::chrono::system_clock>>::Managed_Base:: 操作符=;
35 [[nodiscard]] std::chrono::time_point<std::chrono::system_clock> detach()
const {
36 return m_obj->template<realm::internal::bridge::timestamp> get(m_key);
39 [[nodiscard]]
操作符std::chrono::time_point<std::chrono::system_clock>()
const {
43 auto time_since_epoch()
const {
44 auto Typescript = m_obj->template get<internal::bridge::timestamp>(m_key);
45 return ts.get_time_point().time_since_epoch();
48 template <
typename S>
49 void Operator+=(
const std::chrono::duration<S>& rhs) {
50 auto Typescript = m_obj->template get<internal::bridge::timestamp>(m_key);
55 rbool 操作符==(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
56 rbool操作符!=(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
57 rbool Operator>(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
58 rbool Operator>=(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
59 rbool Operator<(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
60 rbool 操作符<=(
const std::chrono::time_point<std::chrono::system_clock>& rhs)
const noException ;
64 托管 (
const 托管 &) =
delete ;
65 托管 (
托管 &&) =
delete ;
66 托管 & 操作符=(
const 托管 &) =
delete ;
67 托管 & 操作符=(
托管 &&) =
delete ;
68 template <
typename ,
typename >
73 struct 托管 <std::Optional<std::chrono::time_point<std::chrono::system_clock>>> :
Managed_base {
74 using value_type = std::Optional<std::chrono::time_point<std::chrono::system_clock>>;
75 运用 Managed <std::Optional<std::chrono::time_point<std::chrono::system_clock>>>::managed_base::operator=;
77 [[nodiscard]] std::Optional<std::chrono::time_point<std::chrono::system_clock>> detach()
const {
81 [[nodiscard]]
操作符std::Optional<std::chrono::time_point<std::chrono::system_clock>>()
const {
86 template <
typename S>
87 void Operator+=(
const std::chrono::duration<S>& rhs) {
91 auto time_since_epoch()
const {
93 return ts->get_time_point().time_since_epoch();
96 盒子(
托管和父):m_parent(parent) { }
97 std::reference_wrapper< 托管<std::Optional<std::chrono::time_point<std::chrono::system_clock>>>> m_parent;
98 朋友 struct Managed <std::Optional<std::chrono::time_point<std::chrono::system_clock>>>;
101 std::unique_ptr<box> Operator->()
103 return std::make_unique<box>(
box (*
this ));
105 [[nodiscard]]
框操作符*() {
106 return Box (*
this );
110 rbool操作符==(
const std::Optional<std::chrono::time_point<std::chrono::system_clock>>& rhs)
const noException ;
111 rbool操作符!=(
const std::Optional<std::chrono::time_point<std::chrono::system_clock>>& rhs)
const noException ;
115 托管 (
const 托管 &) =
delete ;
116 托管 (
托管 &&) =
delete ;
117 托管 & 操作符=(
const 托管 &) =
delete ;
118 托管 & 操作符=(
托管 &&) =
delete ;
119 template <
typename ,
typename >
定义: managed_dictionary.hpp: 129