gCAD3D 2.35
ut_memTab.h File Reference

Go to the source code of this file.

Macros

#define def_MemTab(vTyp1)
 
#define typedef_MemTab(vTyp1)   def_MemTab(vTyp1) MemTab_##vTyp1
 template for the typedef: More...
 
#define MemTab(vTyp1)   MemTab_##vTyp1
 template for the typename: More...
 
#define MemTab_empty   {NULL, 0, 0, 0}
 
#define MEMTAB__(mtb, irec)   (&((mtb)->data[irec]))
 
#define MEMTAB_IND(mtb)   ((mtb)->rNr)
 
#define MEMTAB_MAX(mtb)   ((mtb)->rSiz)
 
#define MEMTAB_DAT(mtb)   ((mtb)->data)
 
#define MEMTAB_POS(mtb)   (&((mtb)->data[(mtb)->rNr]))
 
#define MEMTAB_IND_POS(mtb, pos)   (((char*)pos - (char*)(mtb)->data) / (mtb)->rSiz)
 

Functions

 def_MemTab (void) MemTab
 default-typedef (mit void *data) More...
 
int MEMTAB_IND (MemTab *)
 
int MEMTAB_MAX (MemTab *)
 
void * MEMTAB__ (MemTab *, int)
 
void * MEMTAB_DAT (MemTab *)
 
void * MEMTAB_POS (MemTab *)
 
int MEMTAB_IND_POS (MemTab *, void *)
 

Macro Definition Documentation

#define def_MemTab (   vTyp1)
Value:
typedef struct {vTyp1 *data; int rMax, rNr, rSiz;\
unsigned char typ, incSiz, use, spcTyp;}
void * data
Definition: ut_geo.h:240
short typ
Definition: ut_geo.h:240
Typ_MemTab - template for the typedef:
data startpos of memspc; typ = template-parameter # 1
rMax size of data is (rMax * rSiz) bytes
rNr nr of used records in data
rSiz recordsize in bytes
typ type of data-records; for info only.
incSiz if Memspc is too small: add UTI_round_b2i(incSiz * rSiz)
-1 = cannot realloc (fixed space)
use application-specific
u4 unused
#define typedef_MemTab (   vTyp1)    def_MemTab(vTyp1) MemTab_##vTyp1

template for the typedef:

#define MemTab (   vTyp1)    MemTab_##vTyp1

template for the typename:

#define MemTab_empty   {NULL, 0, 0, 0}
#define MEMTAB__ (   mtb,
  irec 
)    (&((mtb)->data[irec]))
#define MEMTAB_IND (   mtb)    ((mtb)->rNr)
#define MEMTAB_MAX (   mtb)    ((mtb)->rSiz)
#define MEMTAB_DAT (   mtb)    ((mtb)->data)
#define MEMTAB_POS (   mtb)    (&((mtb)->data[(mtb)->rNr]))
#define MEMTAB_IND_POS (   mtb,
  pos 
)    (((char*)pos - (char*)(mtb)->data) / (mtb)->rSiz)

Function Documentation

def_MemTab ( void  )

default-typedef (mit void *data)

int MEMTAB_IND ( MemTab )
int MEMTAB_MAX ( MemTab )
void* MEMTAB__ ( MemTab ,
int   
)
void* MEMTAB_DAT ( MemTab )
void* MEMTAB_POS ( MemTab )
int MEMTAB_IND_POS ( MemTab ,
void *   
)