44 template <lifetime_state RequiredState>
49 template <
typename Subject>
50 lifetime_flag(
const Subject& aSubject, std::enable_if_t<std::is_base_of_v<i_lifetime, Subject>,
sfinae> = {}) :
52 template <
typename Subject>
53 lifetime_flag(
const Subject& aSubject, std::enable_if_t<!std::is_base_of_v<i_lifetime, Subject>,
sfinae> = {}) :
66 operator
bool() const final;
84 using typename Base::not_creating;
85 using typename Base::already_destroyed;
98 void set_alive() override;
99 void set_destroying() override;
100 void set_destroyed() override;
105 template <typename Base>
110 template <
typename Base>
120 template <
typename Base>
126 template <
typename Base>
132 template <
typename Base>
138 template <
typename Base>
144 template <
typename Base>
150 template <
typename Base>
156 template <
typename Base>
164 template <
typename Base>
175 template <
typename Base>
lifetime_flag(const Subject &aSubject, std::enable_if_t< std::is_base_of_v< i_lifetime, Subject >, sfinae >={})
bool debug() const override
bool is_destroying() const final
bool is_creating() const final
lifetime_flag(lifetime_flag &&aOther)
lifetime_flag(const Subject &aSubject, std::enable_if_t<!std::is_base_of_v< i_lifetime, Subject >, sfinae >={})
bool is_destroyed() const final
lifetime_flag(const i_lifetime &aSubject)
lifetime_flag & operator=(const lifetime_flag &aOther)
lifetime_flag & operator=(lifetime_flag &&aOther)
bool is_alive() const final
void set_debug(bool aDebug=true) override
lifetime_flag(const lifetime_flag &aOther)
void set_destroying() override
lifetime_state object_state() const final
bool is_creating() const final
neolib::destroyed_flag destroyed_flag
lifetime(lifetime_state aState=lifetime_state::Alive)
void set_destroyed() override
bool is_destroying() const final
bool is_alive() const final
void set_alive() override
bool is_destroyed() const final
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr() const final
std::optional< destroyed_flag > optional_destroyed_flag
std::optional< destroying_flag > optional_destroying_flag