NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
OSPF_List.h
1#pragma once
2/************************************************************************************
3* Copyright (C) 2023 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* Author: Shashi Kant Suman *
13* *
14* ---------------------------------------------------------------------------------*/
15
16#ifndef _NETSIM_OSPF_LIST_H_
17#define _NETSIM_OSPF_LIST_H_
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22//#define _DEBUG_LIST_
23 ptrOSPFLIST ospf_list_init(void(*freeMem)(void*),
24 void*(*copyMem)(void*));
25 UINT ospf_list_get_size(ptrOSPFLIST list);
26
27#ifdef _DEBUG_LIST_
28#define ospf_list_add_mem(list,mem) ospf_list_add_mem_dbg(list,mem,__FUNCTION__,__LINE__)
29#else
30#define ospf_list_add_mem(list,mem) ospf_list_add_mem_dbg(list,mem,NULL,0)
31#endif
32 void ospf_list_add_mem_dbg(ptrOSPFLIST list,
33 void* mem,
34 char* fun,
35 int line);
36 bool ospf_list_is_empty(ptrOSPFLIST list);
37 void* ospf_list_get_mem(ptrOSPFLIST list);
38 void ospf_list_delete_all(ptrOSPFLIST list);
39 void* ospf_list_iterate_mem(ptrOSPFLIST list, void* iterator);
40 void* ospf_list_get_headptr(ptrOSPFLIST list);
41 void ospf_list_delete_mem(ptrOSPFLIST list, void* mem, void* ite);
42 void ospf_list_destroy(ptrOSPFLIST list);
43 void ospf_list_replace_mem(ptrOSPFLIST list, void* oldMem, void* newMem);
44 void ospf_list_remove_mem(ptrOSPFLIST list, void* mem, void* ite);
45 ptrOSPFLIST ospf_list_copyAll(ptrOSPFLIST list);
46 void* ospf_list_newIterator();
47 void ospf_list_deleteIterator(void* ite);
48
50 {
51 UINT count;
52 void** mem;
53 void(*freemem)(void*);
54 };
55 ptrARRAYLIST ospf_arrayList_init(void(*freeMem)(void*));
56 void ospf_add_ptr_to_arrayList(ptrARRAYLIST list, void* mem);
57 void ospf_arraylist_free(ptrARRAYLIST list);
58
59#ifdef __cplusplus
60}
61#endif
62#endif //_NETSIM_OSPF_LIST_H_