1
This commit is contained in:
parent
fe005a6c44
commit
35d98ffd0b
@ -20,13 +20,19 @@ namespace a8
|
|||||||
|
|
||||||
namespace f8
|
namespace f8
|
||||||
{
|
{
|
||||||
|
typedef void (*ReadCsvMetaFileCallback)(const std::string&);
|
||||||
|
|
||||||
bool ReadCsvMetaFile(const std::string& filename,
|
bool ReadCsvMetaFile(const std::string& filename,
|
||||||
google::protobuf::Message* prototype,
|
google::protobuf::Message* prototype,
|
||||||
std::function<void (google::protobuf::Message*)> push_back_func);
|
std::function<void (google::protobuf::Message*)> push_back_func);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool ReadCsvMetaFile(const std::string& filename, std::list<T>& meta_list)
|
bool ReadCsvMetaFile(const std::string& filename, std::list<T>& meta_list,
|
||||||
|
ReadCsvMetaFileCallback callback_func = nullptr)
|
||||||
{
|
{
|
||||||
|
if (callback_func) {
|
||||||
|
callback_func(filename);
|
||||||
|
}
|
||||||
T dummy;
|
T dummy;
|
||||||
return ReadCsvMetaFile(filename,
|
return ReadCsvMetaFile(filename,
|
||||||
&dummy,
|
&dummy,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user