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

用户自定义节点,RamFS 仅负责命名和查找 / User-defined node; RamFS only stores and finds it by name More...

#include <ramfs.hpp>

Inheritance diagram for LibXR::RamFS::Custom:
[legend]
Collaboration diagram for LibXR::RamFS::Custom:
[legend]

Public Member Functions

 Custom (const char *name, uint32_t kind=0, void *context=nullptr)
 构造自定义节点 / Construct a custom node
 
- Public Member Functions inherited from LibXR::RamFS::FsNode
FsNodeType GetNodeType () const
 获取节点类型 / Get the node type
 
const char * GetName () const
 获取节点名称 / Get the node name
 

Data Fields

uint32_t kind_ = 0
 用户定义类型 / User-defined kind
 
void * context_ = nullptr
 用户上下文指针 / User context pointer
 

Additional Inherited Members

- Protected Member Functions inherited from LibXR::RamFS::FsNode
 FsNode (FsNodeType node_type)
 
 FsNode (const FsNode &other)
 
FsNodeoperator= (const FsNode &)=delete
 
- Protected Attributes inherited from LibXR::RamFS::FsNode
const char * name_ = nullptr
 
FsNodeType type_
 
Dirparent_ = nullptr
 
Tree::Node< FsNode * > tree_node_
 

Detailed Description

用户自定义节点,RamFS 仅负责命名和查找 / User-defined node; RamFS only stores and finds it by name

Definition at line 252 of file ramfs.hpp.

Constructor & Destructor Documentation

◆ Custom() [1/2]

RamFS::Custom::Custom ( const char * name,
uint32_t kind = 0,
void * context = nullptr )
explicit

构造自定义节点 / Construct a custom node

Parameters
name节点名称 / Node name
kind用户定义类型 / User-defined kind
context用户上下文指针 / User context pointer
Note
包含动态内存分配 / Contains dynamic memory allocation

Definition at line 42 of file ramfs.cpp.

42 : Custom()
43{
44 this->name_ = DuplicateName(name);
45 this->kind_ = kind;
46 this->context_ = context;
47}
Custom(const char *name, uint32_t kind=0, void *context=nullptr)
构造自定义节点 / Construct a custom node
Definition ramfs.cpp:42
void * context_
用户上下文指针 / User context pointer
Definition ramfs.hpp:266
uint32_t kind_
用户定义类型 / User-defined kind
Definition ramfs.hpp:265

◆ Custom() [2/2]

RamFS::Custom::Custom ( )
private

Definition at line 40 of file ramfs.cpp.

40: FsNode(FsNodeType::CUSTOM) {}
@ CUSTOM
用户自定义节点 / User-defined node

Field Documentation

◆ context_

void* LibXR::RamFS::Custom::context_ = nullptr

用户上下文指针 / User context pointer

Definition at line 266 of file ramfs.hpp.

◆ kind_

uint32_t LibXR::RamFS::Custom::kind_ = 0

用户定义类型 / User-defined kind

Definition at line 265 of file ramfs.hpp.


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