Landtiger LPC1768 C BigLib 1
A self made, custom C library for the LandTiger board.
 
Loading...
Searching...
No Matches
cl_types.h File Reference

Go to the source code of this file.

Macros

#define _COMPARE_FN(__name, __a_param, __b_param, ...)    _PRIVATE int __name(const void *const __a_param, const void *const __b_param) __VA_ARGS__
 

Typedefs

typedef int(* CL_CompareFn) (const void *, const void *)
 A function pointer type for comparing two elements.
 

Enumerations

enum  CL_Error {
  CL_ERR_OK = 0 , CL_ERR_INVALID_PARAMS , CL_ERR_OUT_OF_BOUNDS , CL_ERR_NO_MEMORY ,
  CL_ERR_NOT_FOUND , CL_ERR_EMPTY
}
 Specify this in the size parameter of the collections initialization to tell the library that the number of elements is unknown, and thus it should automatically resize the collection as needed. More...
 

Macro Definition Documentation

◆ _COMPARE_FN

#define _COMPARE_FN (   __name,
  __a_param,
  __b_param,
  ... 
)     _PRIVATE int __name(const void *const __a_param, const void *const __b_param) __VA_ARGS__

Definition at line 9 of file cl_types.h.

23{
25 CL_ERR_OK = 0,
26
29
32
35
38
41} CL_Error;
42
43#endif
CL_Error
Specify this in the size parameter of the collections initialization to tell the library that the num...
Definition cl_types.h:24
@ CL_ERR_EMPTY
Empty collection.
Definition cl_types.h:41
@ CL_ERR_NOT_FOUND
Not found.
Definition cl_types.h:38
@ CL_ERR_OUT_OF_BOUNDS
Out of bounds.
Definition cl_types.h:32
@ CL_ERR_NO_MEMORY
No memory available.
Definition cl_types.h:35
@ CL_ERR_INVALID_PARAMS
Invalid arguments.
Definition cl_types.h:29
@ CL_ERR_OK
No error.
Definition cl_types.h:26

Typedef Documentation

◆ CL_CompareFn

typedef int(* CL_CompareFn) (const void *, const void *)

A function pointer type for comparing two elements.

Definition at line 7 of file cl_types.h.

Enumeration Type Documentation

◆ CL_Error

enum CL_Error

Specify this in the size parameter of the collections initialization to tell the library that the number of elements is unknown, and thus it should automatically resize the collection as needed.

Note
Always try to specify the size if possible, as this will potentially save memory and improve performance.

Error codes for the Collections library.

Enumerator
CL_ERR_OK 

No error.

CL_ERR_INVALID_PARAMS 

Invalid arguments.

CL_ERR_OUT_OF_BOUNDS 

Out of bounds.

CL_ERR_NO_MEMORY 

No memory available.

CL_ERR_NOT_FOUND 

Not found.

CL_ERR_EMPTY 

Empty collection.

Definition at line 23 of file cl_types.h.