OC Updated for version 2.0
|
Functions | |
size_t | oc_typesize (OCtype etype) |
const char * | oc_typetostring (OCtype octype) |
OCerror | oc_typeprint (OCtype etype, void *value, size_t bufsize, char *buffer) |
Print a value of an atomic type instance. This is primarily for debugging and provides a simple way to convert a value to a printable string.
[in] | etype | The OCtype atomic type. |
[in] | value | A pointer to the value to be printed. |
[in] | bufsize | The size of the buffer argument |
[in] | buffer | The buffer into which to store the printable value as a NULL terminated string. |
OC_NOERR | if the procedure succeeded |
OtherError | if one of the arguments is illegal. |
size_t oc_typesize | ( | OCtype | etype | ) |
Return the size of the C data structure corresponding to a given atomic type. For example, oc_typesize(OC_Int32) == sizeof(int), and oc_typesize(OC_String) == sizeof(char*). Non-atomic types (e.g. OC_Structure) return zero.
[in] | etype | The atomic type. |
const char* oc_typetostring | ( | OCtype | octype | ) |
Return a string corresponding to the to a given OCtype. For example, oc_typetostring(OC_Int32) == "Int32" and oc_typesize(OC_Structure) == "Structure". The caller MUST NOT free the returned string.
[in] | octype | The OCtype value. |