Blender
V5.3
source
blender
makesdna
DNA_sdna_pointers.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 "
BLI_vector.hh
"
12
13
#include "
DNA_sdna_types.h
"
14
15
namespace
blender::dna::pointers
{
16
18
struct
PointerInfo
{
20
int64_t
offset
;
22
StringRef
member_type_name
;
23
StringRef
name
;
24
};
25
27
struct
StructInfo
{
29
Vector<PointerInfo>
pointers
;
31
int
size_in_bytes
= 0;
32
33
bool
has_pointer_at_offset
(
int64_t
offset)
const
;
34
};
35
39
class
PointersInDNA
{
40
private
:
42
const
SDNA
&sdna_;
44
Vector<StructInfo>
structs_;
45
46
public
:
47
explicit
PointersInDNA
(
const
SDNA
&sdna);
48
49
const
StructInfo
&
get_for_struct
(
const
int
struct_nr)
const
50
{
51
return
structs_[struct_nr];
52
}
53
54
private
:
55
void
gather_pointer_members_recursive(
const
SDNA_Struct
&sdna_struct,
56
int
initial_offset,
57
StructInfo
&r_struct_info)
const
;
58
};
59
60
}
// namespace blender::dna::pointers
BLI_vector.hh
DNA_sdna_types.h
blender::StringRef
Definition
BLI_string_ref.hh:165
blender::Vector
Definition
BLI_vector.hh:76
blender::dna::pointers::PointersInDNA::PointersInDNA
PointersInDNA(const SDNA &sdna)
Definition
dna_genfile.cc:2046
blender::dna::pointers::PointersInDNA::get_for_struct
const StructInfo & get_for_struct(const int struct_nr) const
Definition
DNA_sdna_pointers.hh:49
blender::dna::pointers
Definition
DNA_sdna_pointers.hh:15
blender::int64_t
__int64 int64_t
Definition
BKE_text.h:90
blender::SDNA_Struct
Definition
DNA_sdna_types.h:41
blender::SDNA
Definition
DNA_sdna_types.h:54
blender::dna::pointers::PointerInfo
Definition
DNA_sdna_pointers.hh:18
blender::dna::pointers::PointerInfo::offset
int64_t offset
Definition
DNA_sdna_pointers.hh:20
blender::dna::pointers::PointerInfo::name
StringRef name
Definition
DNA_sdna_pointers.hh:23
blender::dna::pointers::PointerInfo::member_type_name
StringRef member_type_name
Definition
DNA_sdna_pointers.hh:22
blender::dna::pointers::StructInfo
Definition
DNA_sdna_pointers.hh:27
blender::dna::pointers::StructInfo::size_in_bytes
int size_in_bytes
Definition
DNA_sdna_pointers.hh:31
blender::dna::pointers::StructInfo::has_pointer_at_offset
bool has_pointer_at_offset(int64_t offset) const
Definition
dna_genfile.cc:2094
blender::dna::pointers::StructInfo::pointers
Vector< PointerInfo > pointers
Definition
DNA_sdna_pointers.hh:29
Generated on
for Blender by
doxygen
1.18.0