Blender V5.3
blender::SDNA Struct Reference

#include <DNA_sdna_types.h>

Classes

struct  [struct].alias

Public Member Functions

 ~SDNA ()

Public Attributes

const char * data = nullptr
int data_size = 0
bool data_alloc = false
int pointer_size = 0
int types_num = 0
Array< StringRef > types
short * types_size = nullptr
Array< int > types_alignment
Array< SDNA_Struct *, 0 > structs
int members_num = 0
Vector< StringRef > members
Vector< short > members_array_num
Map< StringRef, int > types_to_structs_map
struct  alias
LinearAllocator mem_arena

Detailed Description

Definition at line 54 of file DNA_sdna_types.h.

Constructor & Destructor Documentation

◆ ~SDNA()

blender::SDNA::~SDNA ( )

Definition at line 125 of file dna_genfile.cc.

References data, and data_alloc.

Member Data Documentation

◆ alias

◆ data

const char* blender::SDNA::data = nullptr

The 'encoded' data (full copy when data_alloc is set, otherwise borrowed memory).

Definition at line 56 of file DNA_sdna_types.h.

Referenced by blender::init_structDNA(), blender::write_file_handle(), and ~SDNA().

◆ data_alloc

bool blender::SDNA::data_alloc = false

Definition at line 59 of file DNA_sdna_types.h.

Referenced by ~SDNA().

◆ data_size

int blender::SDNA::data_size = 0

Length of data, in bytes.

Definition at line 58 of file DNA_sdna_types.h.

Referenced by blender::init_structDNA(), and blender::write_file_handle().

◆ mem_arena

LinearAllocator blender::SDNA::mem_arena

Temporary memory currently only used for version patching DNA.

Definition at line 138 of file DNA_sdna_types.h.

Referenced by blender::dna_sdna_alias_from_static_elem_full(), blender::DNA_sdna_patch_struct_member(), and blender::sdna_expand_names().

◆ members

◆ members_array_num

Vector<short> blender::SDNA::members_array_num

◆ members_num

int blender::SDNA::members_num = 0

◆ pointer_size

◆ structs

◆ types

◆ types_alignment

Array<int> blender::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 84 of file DNA_sdna_types.h.

Referenced by blender::DNA_struct_alignment(), and blender::init_structDNA().

◆ types_num

int blender::SDNA::types_num = 0

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:

  • Basic types (int, float, etc.) have no matching struct definitions currently.
  • Types can be discovered and added before their struct definition, when they are used for members of another struct which gets parsed first. Number of types.

Definition at line 74 of file DNA_sdna_types.h.

Referenced by blender::DNA_sdna_alias_data_ensure(), blender::DNA_struct_find_index_with_alias_ex(), blender::DNA_struct_find_index_without_alias_ex(), and blender::init_structDNA().

◆ types_size

◆ types_to_structs_map

Map<StringRef, int> blender::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.

Definition at line 118 of file DNA_sdna_types.h.

Referenced by blender::DNA_sdna_alias_data_ensure_structs_map(), blender::DNA_sdna_patch_struct(), blender::DNA_struct_find_index_with_alias_ex(), blender::DNA_struct_find_index_without_alias_ex(), and blender::init_structDNA().


The documentation for this struct was generated from the following files: