Lines Matching refs:mode
59 std::unique_ptr<DataWriter> DataWriter::CreateDataWriter(WriteMode mode, const std::string &path,
62 switch (mode) {
66 LOG(WARNING) << "Unsupported writer mode.";
84 std::unique_ptr<DataWriter> DataWriter::CreateDataWriter(WriteMode mode, const std::string &path,
88 return CreateDataWriter(mode, path, offset);
91 std::unique_ptr<DataWriter> DataWriter::CreateDataWriter(const std::string &mode, const std::string &path,
94 if (auto it = constructorMap_.find(mode); it != constructorMap_.end()) {
97 LOG(ERROR) << "create writer failed, can not find writer mode: " << mode;
106 void DataWriter::RegisterDataWriter(const std::string &mode, WriterConstructor constructor)
108 if (mode.empty() || constructor == nullptr) {
112 if (!constructorMap_.emplace(mode, constructor).second) {
113 LOG(ERROR) << "register writer failed, mode: " << mode;