40 std::ifstream ifs =
File::Get(path_name,
false);
43 log_err(
"csv文件加载失败:{}", path_name);
58 std::vector<std::string> line;
102 line.push_back(temp);
108 line.push_back(temp);
125 ret = std::move(all);
393template<
typename T,
typename F>
404 log_err(
"CSV二进制文件错误:{}", path_name);
409 std::size_t size = 0;
411 if (size !=
sizeof(
T))
413 log_err(
"CSV二进制文件不匹配POD类型大小{},{}:{}", size,
sizeof(
T), path_name);
427void Deserialize(std::string_view path_name, std::vector<T>& container)
431 container.push_back(line);
void PushBack(std::vector< T > &vec)
插入行
bool Read(std::string_view path_name, Vector2< std::string > &ret)
读取一个CSV文件,拆解为每行(换行使用 替代,所有/变为\)
void Deserialize(std::string_view path_name, F fn)
序列化 逗号分隔文件
constexpr uint32_t CSV_FILE_TYPE
std::ifstream Get(std::string_view path_name, bool is_binary=true)
void log_err0(std::string_view str, DL_SOURCE_LOCATION)