QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
type.c File Reference

Functions

type_tappend_type (type_t *type, type_t *new)
 Append a type to the end of a type chain. More...
 
type_tarray_type (type_t *aux, int size)
 
type_tbased_array_type (type_t *aux, int base, int top)
 
void chain_initial_types (void)
 
void chain_type (type_t *type)
 
const char * encode_params (const type_t *type)
 
void encode_type (dstring_t *encoding, const type_t *type)
 
type_tfield_type (type_t *aux)
 
type_tfind_type (type_t *type)
 
void free_type (type_t *type)
 
void init_types (void)
 
int is_array (const type_t *type)
 
int is_enum (const type_t *type)
 
int is_float (const type_t *type)
 
int is_integral (const type_t *type)
 
int is_math (const type_t *type)
 
int is_pointer (const type_t *type)
 
int is_scalar (const type_t *type)
 
int is_struct (const type_t *type)
 
int is_void (const type_t *type)
 
etype_t low_level_type (type_t *type)
 
type_tnew_type (void)
 
type_tpointer_type (type_t *aux)
 
void print_type (const type_t *type)
 
void print_type_str (dstring_t *str, const type_t *type)
 
int type_assignable (const type_t *dst, const type_t *src)
 
const char * type_get_encoding (const type_t *type)
 
int type_size (const type_t *type)
 

Variables

type_ttype_default
 
type_t type_entity = { ev_entity, "entity" }
 
type_t type_field = {ev_field, "field", ty_none, {{&type_void}} }
 
type_t type_float = { ev_float, "float" }
 
type_t type_floatfield = { ev_field, ".float", ty_none, {{&type_float}} }
 
type_t type_function = { ev_func, "function", ty_none, {{&type_void}} }
 
type_t type_integer = { ev_integer, "integer" }
 
type_t type_invalid = { ev_invalid, "invalid" }
 
type_ttype_nil
 
type_t type_param = { ev_invalid, 0, ty_struct }
 
type_t type_pointer = { ev_pointer, "pointer", ty_none, {{&type_void}} }
 
type_t type_quaternion = { ev_quat, "quaternion" }
 
type_t type_short = { ev_short, "short" }
 
type_t type_string = { ev_string, "string" }
 
type_t type_type_encodings = { ev_invalid, "@type_encodings", ty_struct }
 
type_t type_uinteger = { ev_uinteger, "uinteger" }
 
type_t type_va_list = { ev_invalid, 0, ty_struct }
 
type_t type_vector = { ev_vector, "vector" }
 
type_t type_void = { ev_void, "void" }
 
type_t type_zero = { ev_invalid, 0, ty_struct }
 

Function Documentation

type_t* append_type ( type_t type,
type_t new 
)

Append a type to the end of a type chain.

The type chain must be made up of only field, pointer, function and array types, as other types do not have auxiliary type fields.

Parameters
typeThe type chain to which the type will be appended.
newThe type to be appended. May be any type.
Returns
The type chain with the type appended at the deepest level.
type_t* array_type ( type_t aux,
int  size 
)
type_t* based_array_type ( type_t aux,
int  base,
int  top 
)
void chain_initial_types ( void  )
void chain_type ( type_t type)
const char* encode_params ( const type_t type)
void encode_type ( dstring_t encoding,
const type_t type 
)
type_t* field_type ( type_t aux)
type_t* find_type ( type_t type)
void free_type ( type_t type)
void init_types ( void  )
int is_array ( const type_t type)
int is_enum ( const type_t type)
int is_float ( const type_t type)
int is_integral ( const type_t type)
int is_math ( const type_t type)
int is_pointer ( const type_t type)
int is_scalar ( const type_t type)
int is_struct ( const type_t type)
int is_void ( const type_t type)
etype_t low_level_type ( type_t type)
type_t* new_type ( void  )
type_t* pointer_type ( type_t aux)
void print_type ( const type_t type)
void print_type_str ( dstring_t str,
const type_t type 
)
int type_assignable ( const type_t dst,
const type_t src 
)
const char* type_get_encoding ( const type_t type)
int type_size ( const type_t type)

Variable Documentation

type_t* type_default
type_t type_entity = { ev_entity, "entity" }
type_t type_field = {ev_field, "field", ty_none, {{&type_void}} }
type_t type_float = { ev_float, "float" }
type_t type_floatfield = { ev_field, ".float", ty_none, {{&type_float}} }
type_t type_function = { ev_func, "function", ty_none, {{&type_void}} }
type_t type_integer = { ev_integer, "integer" }
type_t type_invalid = { ev_invalid, "invalid" }
type_t* type_nil
type_t type_param = { ev_invalid, 0, ty_struct }
type_t type_pointer = { ev_pointer, "pointer", ty_none, {{&type_void}} }
type_t type_quaternion = { ev_quat, "quaternion" }
type_t type_short = { ev_short, "short" }
type_t type_string = { ev_string, "string" }
type_t type_type_encodings = { ev_invalid, "@type_encodings", ty_struct }
type_t type_uinteger = { ev_uinteger, "uinteger" }
type_t type_va_list = { ev_invalid, 0, ty_struct }
type_t type_vector = { ev_vector, "vector" }
type_t type_void = { ev_void, "void" }
type_t type_zero = { ev_invalid, 0, ty_struct }