Blender V5.3
NOD_warning.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <string>
12
13#include "BLI_hash.hh"
14#include "BLI_string_ref.hh"
15
16namespace blender {
17
18struct Report;
20
21namespace nodes {
22
24enum class NodeWarningType {
25 Error = 0,
26 Warning = 1,
27 Info = 2,
28};
29
32 std::string message;
33
34 NodeWarning() = default;
36 explicit NodeWarning(const Report &report);
37
38 uint64_t hash() const
39 {
40 return get_default_hash(this->type, this->message);
41 }
42
43 friend bool operator==(const NodeWarning &a, const NodeWarning &b) = default;
44};
45
49
51
52} // namespace nodes
53} // namespace blender
int node_warning_type_severity(const NodeWarningType type)
Definition warning.cc:51
int node_warning_type_icon(const NodeWarningType type)
Definition warning.cc:37
bool warning_is_propagated(const NodeWarningPropagation propagation, const NodeWarningType warning_type)
Definition warning.cc:74
StringRefNull node_warning_type_name(const NodeWarningType type)
Definition warning.cc:65
BMesh Iterators.
unsigned __int64 uint64_t
Definition BKE_text.h:91
constexpr uint64_t get_default_hash(const T &v, const Args &...args)
Definition BLI_hash.hh:252
signed char int8_t
Definition BKE_text.h:76
NodeWarning(NodeWarningType type, StringRef message)
friend bool operator==(const NodeWarning &a, const NodeWarning &b)=default