| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 private: | 299 private: |
| 300 struct Mapping { | 300 struct Mapping { |
| 301 string virtual_path; | 301 string virtual_path; |
| 302 string disk_path; | 302 string disk_path; |
| 303 | 303 |
| 304 inline Mapping(const string& virtual_path_param, | 304 inline Mapping(const string& virtual_path_param, |
| 305 const string& disk_path_param) | 305 const string& disk_path_param) |
| 306 : virtual_path(virtual_path_param), disk_path(disk_path_param) {} | 306 : virtual_path(virtual_path_param), disk_path(disk_path_param) {} |
| 307 }; | 307 }; |
| 308 vector<Mapping> mappings_; | 308 std::vector<Mapping> mappings_; |
| 309 string last_error_message_; | 309 string last_error_message_; |
| 310 | 310 |
| 311 // Like Open(), but returns the on-disk path in disk_file if disk_file is | 311 // Like Open(), but returns the on-disk path in disk_file if disk_file is |
| 312 // non-NULL and the file could be successfully opened. | 312 // non-NULL and the file could be successfully opened. |
| 313 io::ZeroCopyInputStream* OpenVirtualFile(const string& virtual_file, | 313 io::ZeroCopyInputStream* OpenVirtualFile(const string& virtual_file, |
| 314 string* disk_file); | 314 string* disk_file); |
| 315 | 315 |
| 316 // Like Open() but given the actual on-disk path. | 316 // Like Open() but given the actual on-disk path. |
| 317 io::ZeroCopyInputStream* OpenDiskFile(const string& filename); | 317 io::ZeroCopyInputStream* OpenDiskFile(const string& filename); |
| 318 | 318 |
| 319 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DiskSourceTree); | 319 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DiskSourceTree); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 } // namespace compiler | 322 } // namespace compiler |
| 323 } // namespace protobuf | 323 } // namespace protobuf |
| 324 | 324 |
| 325 } // namespace google | 325 } // namespace google |
| 326 #endif // GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__ | 326 #endif // GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__ |
| OLD | NEW |