libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::List::BaseNode Class Reference

链表基础节点,所有节点都继承自该类。 Base node for the linked list, serving as a parent for all nodes. More...

#include <list.hpp>

Inheritance diagram for LibXR::List::BaseNode:
Collaboration diagram for LibXR::List::BaseNode:

Public Member Functions

 BaseNode (size_t size)
 构造 BaseNode 并设置节点大小。 Constructs a BaseNode and sets its size.
 
 ~BaseNode ()
 析构函数,确保节点不会在列表中残留。 Destructor ensuring the node does not remain in the list.
 

Data Fields

BaseNodenext_ = nullptr
 指向下一个节点的指针。 Pointer to the next node.
 
size_t size_
 当前节点的数据大小(字节)。 Size of the current node (in bytes).
 

Detailed Description

链表基础节点,所有节点都继承自该类。 Base node for the linked list, serving as a parent for all nodes.

Definition at line 29 of file list.hpp.

Constructor & Destructor Documentation

◆ BaseNode()

LibXR::List::BaseNode::BaseNode ( size_t  size)
inline

构造 BaseNode 并设置节点大小。 Constructs a BaseNode and sets its size.

Parameters
size节点所占用的字节数。 The size of the node in bytes.

Definition at line 39 of file list.hpp.

39: size_(size) {}
size_t size_
当前节点的数据大小(字节)。 Size of the current node (in bytes).
Definition list.hpp:48

◆ ~BaseNode()

LibXR::List::BaseNode::~BaseNode ( )
inline

析构函数,确保节点不会在列表中残留。 Destructor ensuring the node does not remain in the list.

Definition at line 45 of file list.hpp.

45{ ASSERT(next_ == nullptr); }
BaseNode * next_
指向下一个节点的指针。 Pointer to the next node.
Definition list.hpp:47

Field Documentation

◆ next_

BaseNode* LibXR::List::BaseNode::next_ = nullptr

指向下一个节点的指针。 Pointer to the next node.

Definition at line 47 of file list.hpp.

◆ size_

size_t LibXR::List::BaseNode::size_

当前节点的数据大小(字节)。 Size of the current node (in bytes).

Definition at line 48 of file list.hpp.


The documentation for this class was generated from the following file: