cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
toolbox::io::base_file_data_t Class Reference

文件数据的基类 / Base class for data loaded from files More...

#include <base.hpp>

Inheritance diagram for toolbox::io::base_file_data_t:

Public Member Functions

virtual ~base_file_data_t ()=default
 
 base_file_data_t (const base_file_data_t &)=default
 
base_file_data_toperator= (const base_file_data_t &)=default
 
 base_file_data_t (base_file_data_t &&)=default
 
base_file_data_toperator= (base_file_data_t &&)=default
 

Protected Member Functions

 base_file_data_t ()=default
 

Detailed Description

文件数据的基类 / Base class for data loaded from files

这个类作为所有文件数据类型的基类,提供了虚析构函数和默认的拷贝/移动语义 / This class serves as a base for all file data types, providing virtual destructor and default copy/move semantics

// 定义一个派生的文件数据类 / Define a derived file data class
class text_file_data_t : public base_file_data_t {
public:
std::string content;
};
// 使用智能指针管理数据 / Use smart pointer to manage data
auto data = std::make_unique<text_file_data_t>();
data->content = "Hello World";
文件数据的基类 / Base class for data loaded from files
Definition base.hpp:33

Constructor & Destructor Documentation

◆ ~base_file_data_t()

virtual toolbox::io::base_file_data_t::~base_file_data_t ( )
virtualdefault

◆ base_file_data_t() [1/3]

toolbox::io::base_file_data_t::base_file_data_t ( const base_file_data_t )
default

◆ base_file_data_t() [2/3]

toolbox::io::base_file_data_t::base_file_data_t ( base_file_data_t &&  )
default

◆ base_file_data_t() [3/3]

toolbox::io::base_file_data_t::base_file_data_t ( )
protecteddefault

Member Function Documentation

◆ operator=() [1/2]

base_file_data_t & toolbox::io::base_file_data_t::operator= ( base_file_data_t &&  )
default

◆ operator=() [2/2]

base_file_data_t & toolbox::io::base_file_data_t::operator= ( const base_file_data_t )
default

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