|
ubinos
|
ubiclib embedded double linked list API More...
Go to the source code of this file.
Classes | |
| struct | _edlist_t |
| struct | _edlist_elmt_t |
Macros | |
| #define | edlist_init(edlist) |
| #define | edlist_link_init(link) |
| #define | edlist_insertprev(elmttype, linkname, edlist, ref, elmt) |
| #define | edlist_insertnext(elmttype, linkname, edlist, ref, elmt) |
| #define | edlist_remove(elmttype, linkname, elmt) |
| #define | edlist_setcur(elmttype, linkname, edlist, cur) ((elmttype) _edlist_setcur(edlist, cur)) |
| #define | edlist_getcur(elmttype, linkname, edlist) ((elmttype) _edlist_getcur(edlist)) |
| #define | edlist_getcurnext(elmttype, linkname, edlist) |
| #define | edlist_head(elmttype, linkname, edlist) ((elmttype) (edlist)->head) |
| #define | edlist_tail(elmttype, linkname, edlist) ((elmttype) (edlist)->tail) |
| #define | edlist_next(elmttype, linkname, elmt) ((elmt)->linkname.next) |
| #define | edlist_prev(elmttype, linkname, elmt) ((elmt)->linkname.prev) |
| #define | edlist_list(elmttype, linkname, elmt) ((elmt)->linkname.list) |
Typedefs | |
| typedef struct _edlist_t | edlist_t |
| typedef edlist_t * | edlist_pt |
| typedef struct _edlist_elmt_t | edlist_elmt_t |
| typedef edlist_elmt_t * | edlist_elmt_pt |
Functions | |
| void * | _edlist_setcur (edlist_pt edlist, void *cur) |
| void * | _edlist_getcur (edlist_pt edlist) |
ubiclib embedded double linked list API
ubiclib 내장형 더블 링크드 리스트 API를 정의합니다.
| #define edlist_getcur | ( | elmttype, | |
| linkname, | |||
| edlist | |||
| ) | ((elmttype) _edlist_getcur(edlist)) |
현재 엘리먼트를 돌려주는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| #define edlist_getcurnext | ( | elmttype, | |
| linkname, | |||
| edlist | |||
| ) |
현재 엘리먼트 포인터(cur)를 그 다음 엘리먼트 포인터로 변경하고 변경된 현재 엘리먼트 포인터를 돌려주는 매크로,
현재 엘리먼트 포인터가 NULL이거나 마지막 엘리먼트를 가리키면 현재 엘리먼트 포인터를 첫번째 엘리먼트 포인터로 변경
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| #define edlist_head | ( | elmttype, | |
| linkname, | |||
| edlist | |||
| ) | ((elmttype) (edlist)->head) |
첫 엘리먼트를 지정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| #define edlist_init | ( | edlist | ) |
| #define edlist_insertnext | ( | elmttype, | |
| linkname, | |||
| edlist, | |||
| ref, | |||
| elmt | |||
| ) |
지정한 엘리먼트 다음에 엘리먼트를 추가하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| ref | 이 포인터가 가리키는 엘리먼트 다음에 추가함, NULL이면 맨 앞에 추가함 |
| elmt | 추가할 엘리먼트 |
| #define edlist_insertprev | ( | elmttype, | |
| linkname, | |||
| edlist, | |||
| ref, | |||
| elmt | |||
| ) |
지정한 엘리먼트 앞에 엘리먼트를 추가하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| ref | 이 포인터가 가리키는 엘리먼트 앞에 추가함, NULL이면 맨 뒤에 추가함 |
| elmt | 추가할 엘리먼트 |
| #define edlist_link_init | ( | link | ) |
| #define edlist_list | ( | elmttype, | |
| linkname, | |||
| elmt | |||
| ) | ((elmt)->linkname.list) |
지정한 엘리먼트가 소속된 내장형 더블 링크드 리스트를 지정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| elmt | 이 포인터가 가리키는 엘리먼트가 소속된 내장형 더블 링크드 리스트 포인터를 지정 |
| #define edlist_next | ( | elmttype, | |
| linkname, | |||
| elmt | |||
| ) | ((elmt)->linkname.next) |
지정한 엘리먼트 다음 엘리먼트를 지정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| elmt | 이 포인터가 가리키는 엘리먼트 다음 엘리먼트 포인터를 지정 |
| #define edlist_prev | ( | elmttype, | |
| linkname, | |||
| elmt | |||
| ) | ((elmt)->linkname.prev) |
지정한 엘리먼트 이전 엘리먼트를 지정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| elmt | 이 포인터가 가리키는 엘리먼트 이전 엘리먼트 포인터를 지정 |
| #define edlist_remove | ( | elmttype, | |
| linkname, | |||
| elmt | |||
| ) |
엘리먼트를 소속된 리스트에서 제거하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| elmt | 제거할 엘리먼트 |
| #define edlist_setcur | ( | elmttype, | |
| linkname, | |||
| edlist, | |||
| cur | |||
| ) | ((elmttype) _edlist_setcur(edlist, cur)) |
현재 엘리먼트를 설정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| cur | 현재 엘리먼트로 설정할 엘리먼트 포인터 |
| #define edlist_tail | ( | elmttype, | |
| linkname, | |||
| edlist | |||
| ) | ((elmttype) (edlist)->tail) |
마지막 엘리먼트를 지정하는 매크로
| elmttype | 엘리먼트 포인터 형 |
| linkname | 링크 이름 |
| edlist | 대상 리스트 포인터 |
| typedef edlist_elmt_t* edlist_elmt_pt |
내장형 더블 링크드 리스트 엘리먼트 포인터 형 정의 예
| typedef struct _edlist_elmt_t edlist_elmt_t |
내장형 더블 링크드 리스트 엘리먼트 자료 구조 예
내장형 더블 링크드 리스트 엘리먼트 형 정의 예
| void* _edlist_getcur | ( | edlist_pt | edlist | ) |
현재 엘리먼트를 돌려주는 함수
| edlist | 대상 리스트 포인터 |
| void* _edlist_setcur | ( | edlist_pt | edlist, |
| void * | cur | ||
| ) |
현재 엘리먼트를 설정하는 함수
| edlist | 대상 리스트 포인터 |
| cur | 현재 엘리먼트로 설정할 엘리먼트 포인터 |