mirror of
https://gitee.com/apaki/unicstl.git
synced 2026-05-28 22:54:19 +08:00
- 移除 list 源码、头文件及测试用例 - 将 demo 及测试迁移至 arraylist - 在 arraylist 中实现 slice 功能并支持负索引 - 修复 arraylist 负数索引计算逻辑 - 修复 darray 打印函数参数错误 - 优化 mempool 日志输出格式 BREAKING CHANGE: 移除 list 模块;arraylist::slice 返回值改为新列表实例
52 lines
819 B
C
52 lines
819 B
C
/**
|
|
* @file demo.h
|
|
* @author wenjf (Orig5826@163.com)
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2024-08-27
|
|
*
|
|
* @copyright Copyright (c) 2024
|
|
*
|
|
*/
|
|
#ifndef _DEMO_H_
|
|
#define _DEMO_H_
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS 1 // for vs2022
|
|
|
|
#include "unicstl.h"
|
|
|
|
/**
|
|
* @brief demo objects
|
|
*
|
|
*/
|
|
struct _student
|
|
{
|
|
char name[16];
|
|
int id;
|
|
};
|
|
|
|
void print_num(const void* obj);
|
|
int compare_num(const void *obj, const void *obj2);
|
|
|
|
void print_struct(const void* obj);
|
|
int compare_struct(const void *obj, const void *obj2);
|
|
|
|
void print_char(const void* obj);
|
|
void print_str(const void* obj);
|
|
|
|
|
|
/**
|
|
* @brief test function
|
|
*
|
|
*/
|
|
void demo_arraylist(void);
|
|
void demo_stack(void);
|
|
void demo_deque(void);
|
|
void demo_queue(void);
|
|
void demo_tree(void);
|
|
void demo_heap(void);
|
|
void demo_graph(void);
|
|
|
|
#endif // _DEMO_H_
|
|
|