|
Blender V4.3
|
#include <DNA_sdna_types.h>
Public Attributes | ||
| const char * | data | |
| int | data_size | |
| bool | data_alloc | |
| int | pointer_size | |
| int | types_num | |
| const char ** | types | |
| short * | types_size | |
| int * | types_alignment | |
| int | structs_num | |
| SDNA_Struct ** | structs | |
| int | members_num | |
| int | members_num_alloc | |
| const char ** | members | |
| short * | members_array_num | |
| struct GHash * | types_to_structs_map | |
| struct { | ||
| const char ** types | ||
| const char ** members | ||
| struct GHash * types_to_structs_map | ||
| } | alias | |
| struct MemArena * | mem_arena | |
Definition at line 38 of file DNA_sdna_types.h.
| struct { ... } SDNA::alias |
Runtime versions of data stored in DNA, lazy initialized, only different when renaming is done.
Contains mapping from original (static) types/members names to their current (alias) DNA-defined versions (i.e. results from calling DNA_alias_maps with DNA_RENAME_ALIAS_FROM_STATIC).
Referenced by DNA_sdna_alias_data_ensure(), DNA_sdna_alias_data_ensure_structs_map(), DNA_sdna_free(), DNA_sdna_patch_struct_member(), DNA_struct_find_index_with_alias_ex(), DNA_struct_identifier(), elem_exists_with_alias(), elem_offset_with_alias(), init_structDNA(), and rna_find_sdna_member().
| const char* SDNA::data |
The 'encoded' data (full copy when data_alloc is set, otherwise borrowed memory).
Definition at line 40 of file DNA_sdna_types.h.
Referenced by DNA_sdna_free(), DNA_sdna_from_data(), init_structDNA(), and write_file_handle().
| bool SDNA::data_alloc |
Definition at line 43 of file DNA_sdna_types.h.
Referenced by DNA_sdna_free(), and DNA_sdna_from_data().
| int SDNA::data_size |
Length of data, in bytes.
Definition at line 42 of file DNA_sdna_types.h.
Referenced by DNA_sdna_from_data(), and write_file_handle().
| struct MemArena* SDNA::mem_arena |
Temporary memory currently only used for version patching DNA.
Definition at line 131 of file DNA_sdna_types.h.
Referenced by DNA_sdna_alias_data_ensure(), dna_sdna_alias_from_static_elem_full(), DNA_sdna_free(), DNA_sdna_patch_struct_member(), init_structDNA(), and sdna_expand_names().
| const char** SDNA::members |
Struct member names.
Aligned with SDNA.members, same pointers when unchanged.
Definition at line 95 of file DNA_sdna_types.h.
Referenced by DNA_sdna_alias_data_ensure(), DNA_sdna_free(), DNA_sdna_patch_struct_member(), DNA_struct_member_size(), elem_exists_with_alias(), elem_exists_without_alias(), elem_offset_with_alias(), elem_offset_without_alias(), find_member_with_matching_name(), get_member_size_in_bytes(), get_struct_member_category(), init_reconstruct_step_for_member(), init_structDNA(), rna_find_sdna_member(), sdna_expand_names(), and set_compare_flags_for_struct().
| short* SDNA::members_array_num |
Aligned with members. The total number of items in the array defined by the matching member, if any, otherwise 1.
Result of DNA_member_array_num.
Definition at line 102 of file DNA_sdna_types.h.
Referenced by DNA_sdna_free(), DNA_sdna_patch_struct_member(), DNA_struct_member_size(), DNA_struct_switch_endian(), get_member_size_in_bytes(), init_reconstruct_step_for_member(), init_structDNA(), and sdna_expand_names().
| int SDNA::members_num |
Total number of struct members.
Definition at line 86 of file DNA_sdna_types.h.
Referenced by DNA_sdna_alias_data_ensure(), DNA_sdna_patch_struct_member(), init_structDNA(), and sdna_expand_names().
| int SDNA::members_num_alloc |
Contains the number of allocated items in both members and members_array_num arrays below.
Typically same as #members_len, unless after versioning DNA info (these arrays are reallocated by chunks, see DNA_sdna_patch_struct_member).
Definition at line 93 of file DNA_sdna_types.h.
Referenced by DNA_sdna_patch_struct_member(), and init_structDNA().
| int SDNA::pointer_size |
Size of a pointer in bytes.
Definition at line 46 of file DNA_sdna_types.h.
Referenced by BLO_read_pointer_array(), DNA_struct_member_size(), DNA_struct_switch_endian(), get_member_size_in_bytes(), init_reconstruct_step_for_member(), init_structDNA(), and set_compare_flags_for_struct().
| SDNA_Struct** SDNA::structs |
Information about structs and their members.
Definition at line 81 of file DNA_sdna_types.h.
Referenced by DNA_reconstruct_info_create(), DNA_sdna_alias_data_ensure(), DNA_sdna_alias_data_ensure_structs_map(), DNA_sdna_free(), DNA_sdna_patch_struct(), DNA_sdna_patch_struct_member(), DNA_struct_find_index_with_alias_ex(), DNA_struct_find_index_without_alias_ex(), DNA_struct_get_compareflags(), DNA_struct_identifier(), DNA_struct_member_exists_with_alias(), DNA_struct_member_exists_without_alias(), DNA_struct_member_offset_by_name_with_alias(), DNA_struct_member_offset_by_name_without_alias(), DNA_struct_reconstruct(), DNA_struct_size(), DNA_struct_switch_endian(), init_structDNA(), print_reconstruct_step(), reconstruct_structs(), rna_find_sdna_member(), sdna_expand_names(), and set_compare_flags_for_struct().
| int SDNA::structs_num |
This covers all known structs from SDNA (pointers to SDNA_Struct data).
NOTE: See comment above about SDNA types above for differences between structs and types definitions. Number of struct definitions.
Definition at line 79 of file DNA_sdna_types.h.
Referenced by DNA_reconstruct_info_create(), DNA_reconstruct_info_free(), DNA_sdna_alias_data_ensure(), DNA_sdna_alias_data_ensure_structs_map(), DNA_struct_find_index_with_alias_ex(), DNA_struct_find_index_without_alias_ex(), DNA_struct_get_compareflags(), init_structDNA(), and sdna_expand_names().
| const char** SDNA::types |
Type names.
Aligned with SDNA.types, same pointers when unchanged.
Definition at line 60 of file DNA_sdna_types.h.
Referenced by DNA_reconstruct_info_create(), DNA_sdna_alias_data_ensure(), DNA_sdna_alias_data_ensure_structs_map(), DNA_sdna_free(), DNA_sdna_patch_struct(), DNA_struct_find_index_with_alias_ex(), DNA_struct_find_index_without_alias_ex(), DNA_struct_get_compareflags(), DNA_struct_identifier(), DNA_struct_reconstruct(), DNA_struct_switch_endian(), elem_exists_with_alias(), elem_exists_without_alias(), elem_offset_with_alias(), elem_offset_without_alias(), get_struct_member_category(), init_reconstruct_step_for_member(), init_structDNA(), print_reconstruct_step(), rna_find_sdna_member(), and set_compare_flags_for_struct().
| int* SDNA::types_alignment |
Alignment used when allocating pointers to this type. The actual minimum alignment of the type may be lower in some cases. For example, the pointer alignment of a single char is at least 8 bytes, but the alignment of the type itself is 1.
Definition at line 68 of file DNA_sdna_types.h.
Referenced by DNA_sdna_free(), DNA_struct_alignment(), and init_structDNA().
| int SDNA::types_num |
This covers all known types (basic and structs ones) from SDNA.
NOTE: This data is not in sync with the SDNA structs info below. Among other things:
Definition at line 58 of file DNA_sdna_types.h.
Referenced by DNA_sdna_alias_data_ensure(), DNA_struct_find_index_with_alias_ex(), DNA_struct_find_index_without_alias_ex(), and init_structDNA().
| short* SDNA::types_size |
Type lengths.
Definition at line 62 of file DNA_sdna_types.h.
Referenced by DNA_struct_member_size(), DNA_struct_reconstruct(), DNA_struct_size(), DNA_struct_switch_endian(), get_member_size_in_bytes(), init_reconstruct_step_for_member(), init_structDNA(), print_reconstruct_step(), reconstruct_structs(), and set_compare_flags_for_struct().
| struct GHash* SDNA::types_to_structs_map |
Mapping between type names (from types array above) and struct indices (into structs array above).
Requires WITH_DNA_GHASH to be used for now.
A version of SDNA.types_to_structs_map that uses SDNA.alias.types for its keys.
Definition at line 111 of file DNA_sdna_types.h.
Referenced by DNA_sdna_alias_data_ensure_structs_map(), DNA_sdna_free(), DNA_sdna_patch_struct(), DNA_struct_find_index_with_alias_ex(), DNA_struct_find_index_without_alias_ex(), and init_structDNA().