加入收藏
举报
02-14 20:02
#0
文件名称:
OHOS-List-T.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
14.01 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# OHOS::List< T \>
## **Overview**
**Related Modules:**
[Graphic](Graphic.md)
**Description:**
Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Public Member Functions


































































Public Member Function Name


Description


List ()


 


A default constructor used to create a List instance. The initial size is 0.


~List ()


virtual 


A destructor used to delete the List instance.


Front () const


const T 


Obtains the head node data of a linked list.


Back () const


const T 


Obtains the tail node data of a linked list.


PushBack (T data)


void 


Inserts data at the end of a linked list.


PushFront (T data)


void 


Inserts data at the start of a linked list.


PopBack ()


void 


Pops up a data record at the end of a linked list.


PopFront ()


void 


Pops up a data record at the start of a linked list.


Insert (ListNode< T > *node, T data)


void 


Inserts data before a specified node, which follows the inserted data node.


Remove (ListNode< T > *node)


void 


Deletes a data node.


Clear ()


void 


Deletes all nodes from a linked list.


Head () const


ListNode< T > * 


Obtains the head node address of a linked list.


Tail () const


ListNode< T > * 


Obtains the tail node address of a linked list.


Begin () const


ListNode< T > * 


Obtains the head node address of a linked list.


End () const


const ListNode< T > * 


Obtains the end node address of a linked list.


Next (const ListNode< T > *node) const


ListNode< T > * 


Obtains the address of the node following the specified node.


IsEmpty () const


bool 


Checks whether a linked list is empty.


Size () const


uint16_t 


Obtains the size of a linked list.


operator new (size_t size)


void * 


Overrides the new function.


operator delete (void *p)


void 


Overrides the delete function.


点赞 回复
回帖
支持markdown部分语法 ?