diff options
| author | Pimyn Girgis <pimyn@google.com> | 2025-12-02 12:28:10 +0000 |
|---|---|---|
| committer | Tahuti <pimyn@google.com> | 2025-12-03 09:02:54 +0000 |
| commit | 1cfbf16e320ca9bdadd9c24eb1d2d68b25369ba6 (patch) | |
| tree | be0ce827f327c8a76125307e64047e01fa449d4c /executor/_include/flatbuffers/file_manager.h | |
| parent | 42a04216dd856c12e723e48930e85d63998e4eda (diff) | |
executor: update flatbuffers
Update flatbuffers to v23.5.26, which matches the compiler version in the new env container.
Diffstat (limited to 'executor/_include/flatbuffers/file_manager.h')
| -rw-r--r-- | executor/_include/flatbuffers/file_manager.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/executor/_include/flatbuffers/file_manager.h b/executor/_include/flatbuffers/file_manager.h new file mode 100644 index 000000000..069df5b88 --- /dev/null +++ b/executor/_include/flatbuffers/file_manager.h @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FLATBUFFERS_FILE_MANAGER_H_ +#define FLATBUFFERS_FILE_MANAGER_H_ + +#include <set> +#include <string> + +#include "flatbuffers/util.h" + +namespace flatbuffers { + +// A File interface to write data to file by default or +// save only file names +class FileManager { + public: + FileManager() = default; + virtual ~FileManager() = default; + + virtual bool SaveFile(const std::string &absolute_file_name, + const std::string &content) = 0; + + virtual bool LoadFile(const std::string &absolute_file_name, + std::string *buf) = 0; + + private: + // Copying is not supported. + FileManager(const FileManager &) = delete; + FileManager &operator=(const FileManager &) = delete; +}; + +} // namespace flatbuffers + +#endif // FLATBUFFERS_FILE_MANAGER_H_ |
