CWB
Data Structures | Data Fields
_cl_lexhash_entry Struct Reference

Underlying structure for the cl_lexhash_entry class. More...

#include <cl.h>

Data Structures

struct  _cl_lexhash_entry_data
 This entry's data fields, i.e. More...
 

Data Fields

struct _cl_lexhash_entrynext
 Note that the fields of this structure have been re-ordered to ensure proper alignment without any padding. More...
 
unsigned int freq
 frequency of this type More...
 
int id
 the id code of this type More...
 
struct
_cl_lexhash_entry::_cl_lexhash_entry_data 
data
 
char key [1]
 hash key == type (embedded in struct) More...
 

Detailed Description

Underlying structure for the cl_lexhash_entry class.

Unlike most underlying structures, this is public in the CL API. This is done so that applications can access the embedded payload directly (as entry->data->integer, ...).

Such structures MUST NOT be allocated or copied directly by an application! Neither may internal fields, esp. entry->key, be modified. Only read and write access to the payload of entries returned by cl_lexhash_find() and cl_lexhash_add() is allowed.

Field Documentation

unsigned int freq

frequency of this type

Referenced by cl_lexhash_add(), cl_lexhash_del(), and cl_lexhash_freq().

int id

the id code of this type

Referenced by cl_lexhash_add(), cl_lexhash_id(), encode_add_wattr_line(), and sencode_write_region().

char key[1]

hash key == type (embedded in struct)

Referenced by cl_lexhash_add(), cl_lexhash_check_grow(), and cl_lexhash_find_i().

struct _cl_lexhash_entry* next

Note that the fields of this structure have been re-ordered to ensure proper alignment without any padding.

next entry on the linked-list (ie in the bucket)

Referenced by cl_delete_lexhash(), cl_lexhash_add(), cl_lexhash_check_grow(), cl_lexhash_del(), and cl_lexhash_find_i().


The documentation for this struct was generated from the following file: