37 #ifndef GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__
38 #define GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__
44 #include <google/protobuf/compiler/parser.h>
45 #include <google/protobuf/descriptor.h>
46 #include <google/protobuf/descriptor_database.h>
48 #include <google/protobuf/port_def.inc>
82 SourceTreeDescriptorDatabase(SourceTree* source_tree);
86 SourceTreeDescriptorDatabase(SourceTree* source_tree,
88 ~SourceTreeDescriptorDatabase();
103 using_validation_error_collector_ =
true;
104 return &validation_error_collector_;
117 class SingleFileErrorCollector;
123 class PROTOBUF_EXPORT ValidationErrorCollector
124 :
public DescriptorPool::ErrorCollector {
127 ~ValidationErrorCollector();
136 ErrorLocation location,
142 friend class ValidationErrorCollector;
144 bool using_validation_error_collector_;
146 ValidationErrorCollector validation_error_collector_;
181 void AddUnusedImportTrackFile(
const std::string& file_name,
182 bool is_error =
false);
183 void ClearUnusedImportTrackFiles();
216 class PROTOBUF_EXPORT SourceTree {
292 DiskFileToVirtualFileResult DiskFileToVirtualFile(
299 bool VirtualFileToDiskFile(
const std::string& virtual_file,
314 : virtual_path(virtual_path_param), disk_path(disk_path_param) {}
316 std::vector<Mapping> mappings_;
334 #include <google/protobuf/port_undef.inc>
336 #endif // GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__