Blender V5.0
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
8
9#pragma once
10
11#include "BLI_string_ref.hh"
12
13namespace blender::bke {
14
27 public:
28 enum class Result {
33 };
34
35 virtual ~AttributeFilter() = default;
36
41 virtual Result filter(const StringRef /*name*/) const
42 {
43 return Result::Process;
44 }
45
49 bool allow_skip(const StringRef name) const
50 {
51 return this->filter(name) == Result::AllowSkip;
52 }
53
55 {
57 return filter;
58 }
59};
60
61} // namespace blender::bke
#define filter
const char * name
virtual Result filter(const StringRef) const
static const AttributeFilter & default_filter()
bool allow_skip(const StringRef name) const
virtual ~AttributeFilter()=default