/*
// CList类的成员
//
// 构造函数 CList 构造一个空的有序列表
//
// 标题/末尾访问 GetHead 返回列表的标题元素(不能为空)
// GetTail 返回列表的末尾元素(不能为空)
//
// 操作 RemoveHead 从列表标题中移走元素
// RemoveTail 从列表末尾移走元素
// AddHead 添加一个元素(或另一个列表的所有元素)到列表标题(生成新的标题)
// AddTail 添加一个元素(或另一个列表的所有元素)到列表尾部(生成新的尾部)
// RemoveAll 从列表中移走所有元素
//
// 循环 GetHeadPosition 返回列表标题元素的位置
// GetTailPosition 返回列表尾部元素的位置
// GetNext 获取用于遍历下一个元素
// GetPrev 获取用于遍历的前一个元素
//
// 获取/修改 GetAt 在指定位置上获得元素
// SetAt 在指定位置上设置元素
// RemoveAt 从列表中删除一个由位置确定的元素
//
// 插入 InsertBefore 在指定位置前插入一个新的元素
// InsertAfter 在指定位置后插入一个新的元素
//
// 查找 Find 获得由指针值确定的元素位置
// FindIndex 获得由基于零的索引指定的元素位置
//
// 状态 GetCount 返回此列表中的元素数
// IsEmpty 检测空列表的情况(没有元素)
*/
#pragma once
#include <stdio.h>
#include <stdlib.h>
struct Data
{
int x;
int y;
char ch[20];
};
struct Node
{
Data data;
struct Node *Next;
};
struct List
{
Node *pfront;
Node *preal;
int len ;
};
void ListInit(List **plist);
void InserList(List *plist, Node *pnode);
void TraverList(List *plist, void (*Traver)(Node *pnode));
void ShowData(Node *pnode);
void MoveData(Node *pnode);
void FindData(Node* pnode);
//Node* FindData(Node* pnode);
void DeleteList(List *plist ,Node *pnode);
// RemoveAt 从列表中删除一个由位置确定的元素
void RemoveAt (List *plist ,int *pos,int *vel);
//返回第nIndex个元素的内部值
int FindIndex( List *plist,int *pos);
int GetCount(List *plist);
int IsEmpty(List *plist);