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