-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircularDoubleLinkedListNode.h
More file actions
36 lines (34 loc) · 1015 Bytes
/
CircularDoubleLinkedListNode.h
File metadata and controls
36 lines (34 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <stdlib.h>
#ifndef TYPE
#define TYPE int
#endif // !TYPE
#ifndef __DLL
#define __DLL
typedef struct CircularDoubleLinkedListNode
{
TYPE info;
void* next;
void* prev;
}CircularDoubleLinkedListNode, CDLLNode;
#endif // !__DLL
#ifndef __CDLL
#define __CDLL
typedef CircularDoubleLinkedListNode CDLLNode;
#endif // !__CDLL
//Initing any kind of manger
void InitManager(void**);
//Inserting the first node into the last place(Manger)(n=0)
void InsertLastCDLLNode(CDLLNode**, TYPE);
//Removing the last Node(n=1)
void DeleteLastCDLLNode(CDLLNode**);
//Insertig into the manger (n>1)
void InsertEndCDLLNode(CDLLNode**, TYPE);
//Delete the current manger (n>1)
void DeleteEndCDLLNode(CDLLNode**);
//Inert a node after the given node(if its not the manger)(n>1)
void InsertNextCDLLNode(CDLLNode*, TYPE);
//Inert a node Before the given node(n>1)
void InertPrevCDLLNode(CDLLNode*, TYPE);
//Delete given node(n>=1)(not the manger)
void DeleteCDLLNode(CDLLNode**);