Blender V5.0
deg_builder_map.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
10
11#include "DNA_ID.h"
12
13namespace blender::deg {
14
15bool BuilderMap::check_is_built(ID *id, int tag) const
16{
17 return (this->get_ID_tag(id) & tag) == tag;
18}
19
20void BuilderMap::tag_built(ID *id, int tag)
21{
22 id_tags_.lookup_or_add(id, 0) |= tag;
23}
24
26{
27 int &id_tag = id_tags_.lookup_or_add(id, 0);
28 const bool result = (id_tag & tag) == tag;
29 id_tag |= tag;
30 return result;
31}
32
34{
35 return id_tags_.lookup_default(id, 0);
36}
37
38} // namespace blender::deg
ID and Library types, which are fundamental for SDNA.
int get_ID_tag(ID *id) const
bool check_is_built(ID *id, int tag=TAG_COMPLETE) const
Map< ID *, int > id_tags_
bool check_is_built_and_tag(ID *id, int tag=TAG_COMPLETE)
void tag_built(ID *id, int tag=TAG_COMPLETE)
Definition DNA_ID.h:414