9 #ifndef __ZEDA_NAME_H__ 10 #define __ZEDA_NAME_H__ 37 #define Z_NAMED_CLASS public: char *name; 39 #define Z_NAMED_CLASS char *name; 43 #define ZNONAME "noname" 45 #define zNamePtr(c) (c)->name 46 #define zNameSetPtr(c,p) ( (c)->name = (p) ) 47 #define zName(c) ( (c) && zNamePtr(c) ? zNamePtr(c) : ZNONAME ) 48 #define zNameSet(c,n) zNameSetPtr( c, zStrClone(n) ) 49 #define zNameFree(c) zFree( zNamePtr(c) ) 51 #define zNameFind(array,n,name,ptr) do{\ 52 int __z_name_find_id;\ 54 if( (name) != NULL && strcmp( (name), ZNONAME ) && (array) != NULL )\ 55 for( __z_name_find_id=0; __z_name_find_id<(n); __z_name_find_id++ )\ 56 if( zNamePtr( &(array)[__z_name_find_id] ) &&\ 57 !strcmp( (name), zName( (&(array)[__z_name_find_id]) ) ) ){\ 58 (ptr) = &(array)[__z_name_find_id];\ #define __END_DECLS
Definition: zeda_defs.h:30
#define __BEGIN_DECLS
Definition: zeda_defs.h:26