Blender V5.3
DNA_session_uid_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_sys_types.hh"
12
13namespace blender {
14
22struct SessionUID {
28
29#ifdef __cplusplus
30 friend bool operator==(const SessionUID &a, const SessionUID &b)
31 {
32 return a.uid_ == b.uid_;
33 }
34 uint64_t hash() const
35 {
36 return uid_;
37 }
38
40 bool is_generated() const;
41#endif
42};
43
44#ifdef __cplusplus
45namespace detail {
46/* Special value which indicates the UID has not been assigned yet. */
47constexpr SessionUID SESSION_UID_NONE = {0};
48} // namespace detail
49
50inline bool SessionUID::is_generated() const
51{
52 return *this != blender::detail::SESSION_UID_NONE;
53}
54
55#endif
56
57} // namespace blender
bool operator==(const Error &left, const Error &right)
BMesh Iterators.
unsigned __int64 uint64_t
Definition BKE_text.h:91
#define hash
Definition noise_c.cc:156