ZE-Standard-Libraries/include/list/list_expand.h

288 lines
9.7 KiB
C
Raw Normal View History

2019-01-06 10:44:11 +00:00
#ifndef list_expand_h
2018-08-23 16:57:38 +00:00
#define list_expand_h
2018-08-22 14:50:08 +00:00
2018-08-23 16:57:38 +00:00
#include <list/list_type.h>
2018-08-22 14:50:08 +00:00
/************************************************
*: ,
* 使.
************************************************/
/*
*, 使
*if_sid指示函数是否为节点获取ID
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
extern Node *nodeWithInt(int, _Bool if_sid);
/*
*, 使
*if_sid指示函数是否为节点获取ID
*: ,NULL.*/
extern Node *nodeWithUInt(unsigned int, _Bool if_sid);
/*
*, 使
*if_sid指示函数是否为节点获取ID
*: ,NULL.*/
extern Node *nodeWithULLInt(unsigned long long, _Bool if_sid);
/*
*, 使
*if_sid指示函数是否为节点获取ID
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
extern Node *nodeWithDouble(double, _Bool if_sid);
/*
*, 使
*if_sid指示函数是否为节点获取ID
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
extern Node *nodeWithString(const char *, _Bool if_sid);
/*
*, 使
*if_sid指示函数是否为节点获取ID
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
extern Node *nodeWithPointer(const void *, _Bool if_sid);
2019-01-06 10:44:11 +00:00
2018-08-22 14:50:08 +00:00
/************************************************
*: ,
* 使
*: .
************************************************/
/*
*
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
extern Node *nodeWithComplex(void);
/*
*
*: type指明所输入值的类型,value为指向所输入值的内存空间的指针
2019-01-06 10:44:11 +00:00
*: 0,-1.*/
2018-08-22 14:50:08 +00:00
extern int addValueForComplex(Node *, int type, void *value);
/*
*
2019-01-06 10:44:11 +00:00
*: 0,-1.*/
2018-08-22 14:50:08 +00:00
extern int addIntForComplex(Node *, int);
/*
*
2019-01-06 10:44:11 +00:00
*: 0,-1.*/
2018-08-22 14:50:08 +00:00
extern int addDoubleForComplex(Node *, double);
/*
*
2019-01-06 10:44:11 +00:00
*: 0,-1.*/
2018-08-22 14:50:08 +00:00
extern int addStringForComplex(Node *, char *);
/*
*
2019-01-06 10:44:11 +00:00
*: 0,-1.*/
2018-08-22 14:50:08 +00:00
extern int addPointerForComplex(Node *, void *);
/************************************************
*: ,
************************************************/
/*
*
*: 0,-1.*/
extern int updateValueWithIntForNode(Node *,int);
/*
*
*: 0,-1.*/
2019-01-06 10:44:11 +00:00
extern int updateValueWithULLIntForNode(Node *, uint64_t);
2018-08-22 14:50:08 +00:00
/*
*
*: 0,-1.*/
extern int updateValueWithDoubleForNode(Node *,double);
/*
*
*: 0,-1.*/
extern int updateValueWithStringForNode(Node *,char *);
/*
*
*: 0,-1.*/
2019-01-06 10:44:11 +00:00
extern int updateValueWithPointerForNode(Node *,void *);
2018-08-22 14:50:08 +00:00
/************************************************
*: ,
************************************************/
/*
*,
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
List *mply_findByIntForNode(List*, int);
/*
*,
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
List *mply_findByDoubleForNode(List*, double);
/*
*,
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
2018-08-22 14:50:08 +00:00
List *mply_findByStringForNode(List*, char *);
/*
*,
2019-01-06 10:44:11 +00:00
*: ,NULL.*/
List *mply_findByPointerForNode(List*, void *);
2018-08-22 14:50:08 +00:00
/************************************************
*:
************************************************/
/*
*
*: p_func为一个函数指针, (type)/(value)/(args),
,,,,
expand_resources为一个链表,
2019-01-06 10:44:11 +00:00
*: ,,NULL.*/
2018-08-22 14:50:08 +00:00
extern List *listThrough(List *p_list, List *(*p_func)(unsigned int type, void *value, List *args), List *expand_resources);
/*
*,便
*/
extern List *newReturn(int if_status ,int status, char *argc, ...);
/*
*,便
*/
2018-08-17 08:58:15 +00:00
List *newCReturn(void);
2018-08-22 14:50:08 +00:00
/*
*,便
*/
2018-08-21 08:26:31 +00:00
unsigned long long getInfoForListThrough(List *expand_resources, int type);
2018-08-22 14:50:08 +00:00
/************************************************
*:
************************************************/
/*
*
*/
2019-01-06 10:44:11 +00:00
uint64_t calListMemory(List *);
2018-08-22 14:50:08 +00:00
2018-08-23 16:57:38 +00:00
/***********************************************
*:
***********************************************/
/*
**/
2019-01-06 10:44:11 +00:00
extern uint64_t len(List *p_list);
2018-08-23 16:57:38 +00:00
/*
*
*: 1,0.*/
extern int isListEmpty(List *p_list);
/*
*
*: */
extern int getByIntForNode(Node *);
/*
*
*: */
extern unsigned int getByUIntForNode(Node *);
/*
*
*: */
extern double getByDoubleForNode(Node *);
/*
*
*: */
extern char *getByStringForNode(Node *);
/*
*
*: */
extern void *getByPointerForNode(Node *);
/*
*
*: */
extern unsigned long long getIndexForNode(List *p_list,Node *p_node);
/*
*,.
*: ,NULL*/
extern Node *updateNodeByIndex(List *p_list, void *new_value, unsigned long long index);
/**********************************************
*:
*********************************************/
/*
*,,.
*: ID相同.
*: ,NULL*/
extern Node *copyNode(Node *);
/*
*,,.
*: ID相同.
*: ,NULL*/
List *copyList(List *p_list);
/*
*
*: ,NULL.*/
extern Node *findByIndexForNode(List *, unsigned long long);
/*
*
*: ,NULL.*/
extern Node *findByIntForNode(List *, int);
/*
*
*: ,NULL.*/
extern Node *findByDoubleForNode(List *, double);
/*
*.
*: ,NULL.*/
extern Node *findByStringForNode(List *, char *);
/*
*.
*: ,NULL.*/
extern Node *findByPointerForNode(List *, void *);
2019-01-06 10:44:11 +00:00
#endif