mirror of https://gitee.com/openkylin/docs.git
更新翻译
Signed-off-by: jlspcdd1227dd <12046126+jlspcdd1227dd@user.noreply.gitee.com>
This commit is contained in:
parent
8790eb1daa
commit
24d0c7007c
|
@ -2894,16 +2894,16 @@ $ sudo apt-get install libkysdk-utils libkysdk-utils-dev
|
|||
| | | str:需要进行strip操作的字符串指针 | 无 |
|
||||
|
||||
|
||||
## **5.4** 链表模块
|
||||
## **5.4** Linked list module
|
||||
>
|
||||
> 该模块实现了 C 语言链表操作相关接口。
|
||||
> This module implements the related interface of linked list operation in C language.
|
||||
|
||||
```
|
||||
$ sudo apt-get install libkysdk-utils libkysdk-utils-dev
|
||||
```
|
||||
|
||||
|
||||
> (1)CMakeLists.txt 构建项目
|
||||
> (1) CMakeLists.txt build project
|
||||
>
|
||||
```
|
||||
aux_source_directory(linklist/skip_linklist SOURCESCODE)
|
||||
|
@ -2925,13 +2925,13 @@ target_link_libraries(test-search kydatastruct)
|
|||
#include "kysdk/kysdk-base/skip_linklist.h"
|
||||
```
|
||||
>
|
||||
> 创建跳表
|
||||
> Create skip list
|
||||
|
||||
|
||||
| | | | |
|
||||
|-----|------|------------------------------------------------|---------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern kysdk_skiplist* kysdk_create_skiplist() | 创建跳表 |
|
||||
| linked list | C | extern kysdk_skiplist* kysdk_create_skiplist() | Create skip list |
|
||||
| | | Parameter Description | Return value description | |
|
||||
| | | 无 | kysdk_skiplist* 跳表 |
|
||||
|
||||
|
@ -2942,7 +2942,7 @@ target_link_libraries(test-search kydatastruct)
|
|||
| | | | |
|
||||
|-----|------|----------------------------------------------------------|-------------------------------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern void kysdk_destroy_skiplist(kysdk_skiplist *list) | 销毁跳表,并回收所有分配的内存;注意data.ptr指向的内存(若存在)不会被释放 |
|
||||
| linked list | C | extern void kysdk_destroy_skiplist(kysdk_skiplist *list) | 销毁跳表,并回收所有分配的内存;注意data.ptr指向的内存(若存在)不会被释放 |
|
||||
| | | Parameter Description | Return value description | |
|
||||
| | | list:跳表 | 无 |
|
||||
|
||||
|
@ -2954,49 +2954,49 @@ target_link_libraries(test-search kydatastruct)
|
|||
| | | | |
|
||||
|-----|------|-----------------------------------------------------------------|---------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern int kysdk_skiplist_delete(kysdk_skiplist *list, int key) | 删除key值对应的节点 |
|
||||
| linked list | C | extern int kysdk_skiplist_delete(kysdk_skiplist *list, int key) | Delete the node corresponding to the key value |
|
||||
| | | Parameter Description | Return value description |
|
||||
| | | list:需要操作的链表 | int, 成功删除返回0,失败返回-1 |
|
||||
| | | list:linked list to be manipulated | int, Successful deletion returns 0, failure returns -1 |
|
||||
| | | key:键 | |
|
||||
|
||||
|
||||
|
||||
> 插入节点
|
||||
> insert node
|
||||
|
||||
|
||||
| | | | |
|
||||
|-----|------|--------------------------------------------------------------------------------------|--------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern int kysdk_skiplist_insert(kysdk_skiplist *list, int key, kysdk_listdata data) | 插入节点 |
|
||||
| linked list | C | extern int kysdk_skiplist_insert(kysdk_skiplist *list, int key, kysdk_listdata data) | insert node |
|
||||
| | | Parameter Description | Return value description |
|
||||
| | | list:需要操作的链表 | int,成功插入返回0,失败返回-1 |
|
||||
| | | list:linked list to be manipulated | int,Successful insertion returns 0, failure returns -1 |
|
||||
| | | key:键 | |
|
||||
| | | data:数据 | |
|
||||
|
||||
|
||||
> 根据给定的 key 搜索 data 内容
|
||||
> Search the content of data according to the given key
|
||||
|
||||
|
||||
| | | | |
|
||||
|-----|------|----------------------------------------------------------------------------|-----------------------------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern kysdk_listdata kysdk_skiplist_search(kysdk_skiplist *list, int key) | 根据给定的key搜索data内容 |
|
||||
| linked list | C | extern kysdk_listdata kysdk_skiplist_search(kysdk_skiplist *list, int key) | Search data content according to the given key |
|
||||
| | | Parameter Description | Return value description |
|
||||
| | | list:需要操作的链表 | kysdk_listdata,当搜索的key不存在时,data.num值为-1 |
|
||||
| | | key:键 | |
|
||||
| | | list:linked list to be manipulated | kysdk_listdata,When the searched key does not exist, the value of data.num is -1 |
|
||||
| | | key:key | |
|
||||
|
||||
|
||||
|
||||
> 设置跳表最高层数
|
||||
> Set the highest level of skip table
|
||||
|
||||
|
||||
| | | | |
|
||||
|-----|------|--------------------------------------------------------------------------------------|------------------------|
|
||||
| submodule | Programming language | statement | describe |
|
||||
| 链表 | C | extern int kysdk_skiplist_setmaxlevels(kysdk_skiplist *list, unsigned int maxlevels) | 设置跳表最高层数,该选项必须在跳表为空时使用 |
|
||||
| linked list | C | extern int kysdk_skiplist_setmaxlevels(kysdk_skiplist *list, unsigned int maxlevels) | Set the highest level of the skip list, this option must be used when the skip list is empty |
|
||||
| | | Parameter Description | Return value description |
|
||||
| | | list:需要修改的跳表 | int,成功返回0,失败返回-1 |
|
||||
| | | maxlevels:层数 | |
|
||||
| | | list:Jump table that needs to be modified | int,Returns 0 on success, -1 on failure |
|
||||
| | | maxlevels:layers | |
|
||||
|
||||
|
||||
|
||||
|
@ -3028,9 +3028,9 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
|
|||
|
||||
| submodule | Programming language | statement | describe |
|
||||
|--------|------|------------------------------------------------|------------------------------|
|
||||
| Profile Operations | C | extern int kdk_conf_init(const char* confpath) | 初始化配置文件 |
|
||||
| Profile Operations | C | extern int kdk_conf_init(const char* confpath) | Initialize the configuration file |
|
||||
| | | Parameter Description | Return value description | |
|
||||
| | | confpath:配置文件的路径 | int 成功返回句柄号(非负值),失败返回错误码(负值) |
|
||||
| | | confpath:The path to the configuration file | int Successfully returns the handle number (non-negative value), fails to return an error code (negative value) |
|
||||
|
||||
|
||||
|
||||
|
@ -3039,7 +3039,7 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread)
|
|||
|
||||
| submodule | Programming language | statement | describe |
|
||||
|--------|------|--------------------------------------|-------------|
|
||||
| Profile Operations | C | extern void kdk_conf_destroy(int id) | 销毁指定的配置文件句柄 |
|
||||
| Profile Operations | C | extern void kdk_conf_destroy(int id) | Destroys the specified profile handle |
|
||||
| | | Parameter Description | Return value description | |
|
||||
| | | id:The configuration file handle returned by kdk_conf_init | 无 |
|
||||
|
||||
|
|
Loading…
Reference in New Issue