Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::CSVWriter类 参考

CSV 流写入器 更多...

#include <CSVWriter.h>

Public 类型

using OutputStream = io::OutputStream
 工具支持的输出流
 
using Row = std::vector<std::string>
 
 

Public 成员函数

 CSVWriter (OutputStream *dest, char split_char=',', bool crlf=true) noexcept
 
void write (const Row &row) noexcept
 

静态 Public 属性

static const char * crlf = "\r\n"
 
static const char * lf = "\n"
 

Protected 属性

char splitChar
 
bool isCRLF
 
OutputStreamdest = nullptr
 

详细描述

CSV 流写入器

成员类型定义说明

◆ OutputStream

工具支持的输出流

◆ Row

using sese::CSVWriter::Row = std::vector<std::string>

构造及析构函数说明

◆ CSVWriter()

sese::CSVWriter::CSVWriter ( OutputStream * dest,
char split_char = ',',
bool crlf = true )
explicitnoexcept

构造函数

参数
dest目的流
split_char分割字符
crlf是否使用 CRLF 作为行分隔符

成员函数说明

◆ write()

void sese::CSVWriter::write ( const Row & row)
noexcept

写入流

参数
row待写入行

类成员变量说明

◆ crlf

const char * sese::CSVWriter::crlf = "\r\n"
static

◆ dest

OutputStream* sese::CSVWriter::dest = nullptr
protected

◆ isCRLF

bool sese::CSVWriter::isCRLF
protected

◆ lf

const char * sese::CSVWriter::lf = "\n"
static

◆ splitChar

char sese::CSVWriter::splitChar
protected

该类的文档由以下文件生成: