Blender V4.3
BKE_attribute_filter.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_function_ref.hh"
8#include "BLI_string_ref.hh"
9
10namespace blender::bke {
11
24 public:
25 enum class Result {
29 Process,
30 };
31
32 virtual ~AttributeFilter() = default;
33
38 virtual Result filter(const StringRef /*name*/) const
39 {
40 return Result::Process;
41 }
42
46 bool allow_skip(const StringRef name) const
47 {
48 return this->filter(name) == Result::AllowSkip;
49 }
50
52 {
54 return filter;
55 }
56};
57
58} // namespace blender::bke
virtual Result filter(const StringRef) const
static const AttributeFilter & default_filter()
bool allow_skip(const StringRef name) const
virtual ~AttributeFilter()=default