![]() |
|
|||
File indexing completed on 2025-08-27 09:30:24
0001 /* 0002 * Copyright 2023 Google Inc. All rights reserved. 0003 * 0004 * Licensed under the Apache License, Version 2.0 (the "License"); 0005 * you may not use this file except in compliance with the License. 0006 * You may obtain a copy of the License at 0007 * 0008 * http://www.apache.org/licenses/LICENSE-2.0 0009 * 0010 * Unless required by applicable law or agreed to in writing, software 0011 * distributed under the License is distributed on an "AS IS" BASIS, 0012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0013 * See the License for the specific language governing permissions and 0014 * limitations under the License. 0015 */ 0016 0017 #ifndef FLATBUFFERS_FILE_MANAGER_H_ 0018 #define FLATBUFFERS_FILE_MANAGER_H_ 0019 0020 #include <set> 0021 #include <string> 0022 0023 #include "flatbuffers/util.h" 0024 0025 namespace flatbuffers { 0026 0027 // A File interface to write data to file by default or 0028 // save only file names 0029 class FileManager { 0030 public: 0031 FileManager() = default; 0032 virtual ~FileManager() = default; 0033 0034 virtual bool SaveFile(const std::string &absolute_file_name, 0035 const std::string &content) = 0; 0036 0037 virtual bool LoadFile(const std::string &absolute_file_name, 0038 std::string *buf) = 0; 0039 0040 private: 0041 // Copying is not supported. 0042 FileManager(const FileManager &) = delete; 0043 FileManager &operator=(const FileManager &) = delete; 0044 }; 0045 0046 } // namespace flatbuffers 0047 0048 #endif // FLATBUFFERS_FILE_MANAGER_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |