Blender V2.61 - r43446

DNA_sdna_types.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00032 #ifndef DNA_SDNA_H
00033 #define DNA_SDNA_H
00034 
00035 #
00036 #
00037 typedef struct SDNA {
00038     char *data;         /* full copy of 'encoded' data */
00039     int datalen;        /* length of data */
00040 
00041     int nr_names;       /* total number of struct members */
00042     const char **names;     /* struct member names */
00043 
00044     int pointerlen;     /* size of a pointer in bytes */
00045 
00046     int nr_types;       /* number of basic types + struct types */
00047     char **types;       /* type names */
00048     short *typelens;    /* type lengths */
00049 
00050     int nr_structs;     /* number of struct types */
00051     short **structs;    /* sp= structs[a] is the address of a struct definintion
00052                            sp[0] is struct type number, sp[1] amount of members
00053 
00054                            (sp[2], sp[3]), (sp[4], sp[5]), .. are the member
00055                            type and name numbers respectively */
00056 
00057     struct GHash *structs_map; /* ghash for faster lookups,
00058                                   requires WITH_DNA_GHASH to be used for now */
00059 
00060         /* wrong place for this really, its a simple
00061          * cache for findstruct_nr.
00062          */
00063     int lastfind;
00064 } SDNA;
00065 
00066 #
00067 #
00068 typedef struct BHead {
00069     int code, len;
00070     void *old;
00071     int SDNAnr, nr;
00072 } BHead;
00073 #
00074 #
00075 typedef struct BHead4 {
00076     int code, len;
00077     int old;
00078     int SDNAnr, nr;
00079 } BHead4;
00080 #
00081 #
00082 typedef struct BHead8 {
00083     int code, len;
00084 #if defined(WIN32) && !defined(FREE_WINDOWS)
00085     /* This is a compiler type! */
00086     __int64 old;
00087 #else
00088     long long old;
00089 #endif  
00090     int SDNAnr, nr;
00091 } BHead8;
00092 
00093 #endif
00094