libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
FsNode Class Reference

RamFS 的公共节点基类片段 / Common node-base fragment of RamFS More...

#include <fs_node.hpp>

Inheritance diagram for FsNode:
[legend]
Collaboration diagram for FsNode:
[legend]

Public Member Functions

FsNodeType GetNodeType () const
 获取节点类型 / Get the node type
 
const char * GetName () const
 获取节点名称 / Get the node name
 

Protected Member Functions

 FsNode (FsNodeType node_type)
 用指定节点类型构造基类部分 / Construct the base node with a given node type
 
 FsNode (const FsNode &other)
 拷贝构造节点基类部分 / Copy-construct the base-node portion
 
FsNodeoperator= (const FsNode &)=delete
 

Protected Attributes

const char * name_ = nullptr
 节点名称缓冲区 / Retained node-name buffer.
 
FsNodeType type_
 节点运行时类型 / Runtime node type.
 
Dirparent_ = nullptr
 父目录;根目录保持为空 / Parent directory; stays null for the root.
 
Tree::Node< FsNode * > tree_node_
 当前节点挂进目录树时使用的树节点包装 / Tree node wrapper used when inserted into a directory tree.
 

Friends

class Dir
 

Detailed Description

RamFS 的公共节点基类片段 / Common node-base fragment of RamFS

文件系统节点基类 / Base class for all RamFS nodes

Definition at line 8 of file fs_node.hpp.

Constructor & Destructor Documentation

◆ FsNode() [1/2]

FsNode::FsNode ( FsNodeType node_type)
explicitprotected

用指定节点类型构造基类部分 / Construct the base node with a given node type

Parameters
node_type节点类型 / Node type

◆ FsNode() [2/2]

FsNode::FsNode ( const FsNode & other)
protected

拷贝构造节点基类部分 / Copy-construct the base-node portion

Parameters
other被拷贝的节点 / Node to copy from
Note
这里只复制节点元数据,不复制父目录关系;新对象默认重新脱离原目录树。 This copies only node metadata and does not preserve parent linkage; the new object is detached from the original directory tree by default.

Member Function Documentation

◆ GetName()

const char * FsNode::GetName ( ) const
inlinenodiscard

获取节点名称 / Get the node name

Returns
节点名称 / Node name

Definition at line 21 of file fs_node.hpp.

21{ return name_; }
const char * name_
节点名称缓冲区 / Retained node-name buffer.
Definition fs_node.hpp:24

◆ GetNodeType()

FsNodeType FsNode::GetNodeType ( ) const
inlinenodiscard

获取节点类型 / Get the node type

Returns
节点类型 / Node type

Definition at line 15 of file fs_node.hpp.

15{ return type_; }
FsNodeType type_
节点运行时类型 / Runtime node type.
Definition fs_node.hpp:25

Friends And Related Symbol Documentation

◆ Dir

friend class Dir
friend

Definition at line 48 of file fs_node.hpp.

Field Documentation

◆ name_

const char* FsNode::name_ = nullptr
protected

节点名称缓冲区 / Retained node-name buffer.

Definition at line 24 of file fs_node.hpp.

◆ parent_

Dir* FsNode::parent_ = nullptr
protected

父目录;根目录保持为空 / Parent directory; stays null for the root.

Definition at line 26 of file fs_node.hpp.

◆ tree_node_

Tree::Node<FsNode*> FsNode::tree_node_
protected

当前节点挂进目录树时使用的树节点包装 / Tree node wrapper used when inserted into a directory tree.

Definition at line 46 of file fs_node.hpp.

◆ type_

FsNodeType FsNode::type_
protected

节点运行时类型 / Runtime node type.

Definition at line 25 of file fs_node.hpp.


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