Blender  V2.93
dna_utils.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct GHash;
28 struct MemArena;
29 
30 int DNA_elem_array_size(const char *str);
31 
32 uint DNA_elem_id_offset_start(const char *elem_full);
33 uint DNA_elem_id_offset_end(const char *elem_full);
34 uint DNA_elem_id_strip_copy(char *elem_dst, const char *elem_src);
35 uint DNA_elem_id_strip(char *elem);
36 bool DNA_elem_id_match(const char *elem_search,
37  const int elem_search_len,
38  const char *elem_full,
39  uint *r_elem_full_offset);
41  const char *elem_src,
42  const int elem_src_len,
43  const char *elem_dst,
44  const int elem_dst_len,
45  const char *elem_src_full,
46  const int elem_src_full_len,
47  const uint elem_src_full_offset_len);
48 
49 /* When requesting version info, support both directions. */
53 };
54 void DNA_alias_maps(enum eDNA_RenameDir version_dir,
55  struct GHash **r_struct_map,
56  struct GHash **r_elem_map);
57 
60 
61 #ifdef __cplusplus
62 }
63 #endif
unsigned int uint
Definition: BLI_sys_types.h:83
uint DNA_elem_id_strip(char *elem)
Definition: dna_utils.c:122
const char * DNA_struct_rename_legacy_hack_static_from_alias(const char *name)
Definition: dna_utils.c:311
char * DNA_elem_id_rename(struct MemArena *mem_arena, const char *elem_src, const int elem_src_len, const char *elem_dst, const int elem_dst_len, const char *elem_src_full, const int elem_src_full_len, const uint elem_src_full_offset_len)
Definition: dna_utils.c:157
uint DNA_elem_id_offset_start(const char *elem_full)
Definition: dna_utils.c:91
eDNA_RenameDir
Definition: dna_utils.h:50
@ DNA_RENAME_ALIAS_FROM_STATIC
Definition: dna_utils.h:52
@ DNA_RENAME_STATIC_FROM_ALIAS
Definition: dna_utils.h:51
uint DNA_elem_id_offset_end(const char *elem_full)
Definition: dna_utils.c:100
bool DNA_elem_id_match(const char *elem_search, const int elem_search_len, const char *elem_full, uint *r_elem_full_offset)
Definition: dna_utils.c:136
const char * DNA_struct_rename_legacy_hack_alias_from_static(const char *name)
Definition: dna_utils.c:327
void DNA_alias_maps(enum eDNA_RenameDir version_dir, struct GHash **r_struct_map, struct GHash **r_elem_map)
Definition: dna_utils.c:210
uint DNA_elem_id_strip_copy(char *elem_dst, const char *elem_src)
Definition: dna_utils.c:112
int DNA_elem_array_size(const char *str)
Definition: dna_utils.c:46
#define str(s)
static MemArena * mem_arena
Definition: makesdna.c:155
const char * name
Definition: BLI_memarena.c:57