mirror of https://gitlab.com/klmp200/LO41.git
31 lines
644 B
C
31 lines
644 B
C
//
|
|
// Created by Antoine Bartuccio on 22/05/2018.
|
|
//
|
|
|
|
#ifndef LO41_ELEMENT_H
|
|
#define LO41_ELEMENT_H
|
|
|
|
typedef struct o_List List;
|
|
|
|
#include "List.h"
|
|
|
|
struct o_Element {
|
|
List *list;
|
|
void *data;
|
|
struct o_Element *next;
|
|
struct o_Element *previous;
|
|
|
|
struct o_Element *(*get_next)(O_THIS(Element));
|
|
struct o_Element *(*get_previous)(O_THIS(Element));
|
|
void *(*get_data)(O_THIS(Element));
|
|
|
|
void (*set_previous)(O_THIS(Element), struct o_Element *previous);
|
|
void (*set_next)(O_THIS(Element), struct o_Element *next);
|
|
|
|
void (*$_free_)(O_THIS(Element));
|
|
};
|
|
|
|
Element *$_init_Element(void *data, size_t size, List *list);
|
|
|
|
#endif //LO41_ELEMENT_H
|