更新翻译

Signed-off-by: jlspcdd1227dd <12046126+jlspcdd1227dd@user.noreply.gitee.com>
This commit is contained in:
jlspcdd1227dd 2023-03-24 09:29:44 +00:00 committed by Gitee
parent 8790eb1daa
commit 24d0c7007c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 22 additions and 22 deletions

View File

@ -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
```
> 1CMakeLists.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 |
| | | listlinked 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 |
| | | listlinked list to be manipulated | intSuccessful 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 | |
| | | listlinked list to be manipulated | kysdk_listdataWhen the searched key does not exist, the value of data.num is -1 |
| | | keykey | |
> 设置跳表最高层数
> 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层数 | |
| | | listJump table that needs to be modified | intReturns 0 on success, -1 on failure |
| | | maxlevelslayers | |
@ -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 成功返回句柄号(非负值),失败返回错误码(负值) |
| | | confpathThe 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 | |
| | | idThe configuration file handle returned by kdk_conf_init | 无 |