gbx_class.h

来自「Gambas is a graphical development enviro」· C头文件 代码 · 共 216 行

H
216
字号
/***************************************************************************  class.h  Class loader  (c) 2000-2004 Beno顃 Minisini <gambas@users.sourceforge.net>  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 1, or (at your option)  any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.***************************************************************************/#ifndef __GBX_CLASS_H#define __GBX_CLASS_H#include "gb_error.h"#include "gb_alloc.h"#include "gbx_type.h"#include "gb_table.h"#include "gbx_class_desc.h"#include "gbx_library.h"typedef  long CLASS_ID;/*typedef  struct {    unsigned char flag;    unsigned char id;    short value;    }  PACKED  CLASS_TYPE;*/typedef  struct {    CTYPE type;    long pos;    }  PACKED  CLASS_VAR;typedef  ushort CLASS_REF;typedef  union {    TYPE type;    struct { TYPE type; double value; } PACKED _float;    struct { TYPE type; long value; } PACKED _integer;    struct { TYPE type; char *addr; long len; } PACKED _string;    }  PACKED  CLASS_CONST;typedef  struct {    CTYPE type;    }  PACKED  CLASS_LOCAL;typedef  struct {    TYPE type;    }  PACKED  CLASS_PARAM;typedef  struct {    SYMBOL sym;    long value;    }  LOCAL_SYMBOL;typedef  struct {    ushort line;    ushort nline;    ushort *pos;    char *name;    LOCAL_SYMBOL *local;    short n_local;    ushort _reserved;  }  PACKED  FUNC_DEBUG;typedef  struct {    TYPE type;    short n_param;    short npmin;    short n_local;    short n_ctrl;    short stack_usage;    short error;    ushort *code;    CLASS_PARAM *param;    CLASS_LOCAL *local;    FUNC_DEBUG *debug;    }  PACKED  FUNCTION;typedef  struct {    TYPE type;    short n_param;    short _reserved;    CLASS_PARAM *param;    char *name;    }  PACKED  CLASS_EVENT;typedef  struct {    ulong magic;    ulong version;    ulong endian;    ulong flag;    }  PACKED  CLASS_HEADER;typedef  struct {    short parent;    short _reserved;    long s_static;    long s_dynamic;    }  PACKED  CLASS_INFO;typedef  struct {    TYPE type;    long dim[0];    }  CLASS_ARRAY;struct _CLASS;typedef  struct {    SYMBOL sym;    CTYPE ctype;    long value;    }  GLOBAL_SYMBOL;typedef  struct {    short n_cst;    short n_stat;    short n_dyn;    short n_func;    CLASS_CONST *cst;    CLASS_VAR *stat;    CLASS_VAR *dyn;    FUNCTION *func;    CLASS_EVENT *event;    CLASS_ARRAY **array;    struct _CLASS **class_ref;    char **unknown;    GLOBAL_SYMBOL *global;    /* symboles globaux */    short n_global;    short _reserved;    }  PACKED  CLASS_LOAD;enum{  CS_NULL = 0,  CS_LOADED = 1,  CS_READY = 2};typedef  struct _CLASS {    struct _CLASS *class;     /*   4  pointe sur la classe Class ! */    long ref;                 /*   8 nombre de r閒閞ences */    long count;               /*  12  nombres d'objets */    struct _CLASS *parent;    /*  16  classe h閞it閑 */    void *belong;             /*  20  librairie ou archive d'appartenance */    char *name;               /*  24  nom de la classe */    char *path;               /*  28  emplacement du fichier source */    unsigned state : 2;       /*      閠at d'initialisation */    unsigned debug : 1;       /*      s'il y a des informations de d閎ogage */    unsigned free_name : 1;   /*      s'il faut lib閞er le nom */    unsigned free_event : 1;  /*      s'il faut lib閞er class->event */    unsigned in_load : 1;     /*      si la classe est en cours de chargement */    unsigned exit : 1;        /*      flag utilis

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?