cu/idr.h: Identifiers (Strings with Pointer Equality)
[Data Types]

Data Structures

struct  cu_idr

Defines

#define cu_idr_of_cstrq   cu_idr_of_cstr
#define cu_idr_to_cstrq   cu_idr_to_cstr

Functions

cuoo_type_t cu_idr_type ()
cu_bool_t cu_is_idr (void *dyn)
cu_idr_t cu_idr_by_cstr (char const *cstr)
cu_idr_t cu_idr_by_charr (char const *arr, size_t size)
cu_idr_t cu_idr_by_wchararr (cu_wchar_t const *arr, size_t len)
cu_idr_t cu_idr_by_wstring (cu_wstring_t s)
char const * cu_idr_to_cstr (cu_idr_t idr)
cu_bool_t cu_idr_eq (cu_idr_t idr0, cu_idr_t idr1)
int cu_idr_strcmp (cu_idr_t idr0, cu_idr_t idr1)

Variables

cuoo_type_t cuP_idr_type

Function Documentation

cu_idr_t cu_idr_by_charr ( char const *  arr,
size_t  size 
)

Returns the identifier with the name given by arr to arr + size. See cu_idr_by_cstr.

cu_idr_t cu_idr_by_cstr ( char const *  cstr  ) 

Returns the identifier with the name cstr. The result is hashconsed, meaning that two simultaneously live cu_idr_t objects constructed from the same string (according to strcmp) have identical pointers.

cu_idr_t cu_idr_by_wchararr ( cu_wchar_t const *  arr,
size_t  len 
)

Returns the identifier with the name given by arr to arr + len. The Unicode string is converted to UTF-8.

cu_idr_t cu_idr_by_wstring ( cu_wstring_t  s  ) 

Returns the identifier of name s. The Unicode string is converted to UTF-8.

cu_bool_t cu_idr_eq ( cu_idr_t  idr0,
cu_idr_t  idr1 
)

A simple pointer comparison.

int cu_idr_strcmp ( cu_idr_t  idr0,
cu_idr_t  idr1 
)

Returns strcmp(cu_idr_to_cstr(idr0), cu_idr_to_cstr(idr1)).

char const* cu_idr_to_cstr ( cu_idr_t  idr  ) 

Return a C string strcmp-equal to the one passed upon costruction.

cuoo_type_t cu_idr_type (  ) 

Returns the type descriptor of all cu_idr_t objects.

cu_bool_t cu_is_idr ( void *  dyn  ) 

True iff the dynamically typed object at dyn is an cu_idr_t.

Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.