File indexing completed on 2025-01-31 10:11:59
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_LINE_CONSUMER_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_LINE_CONSUMER_H__
0010
0011 #include <string>
0012
0013 #include "absl/strings/string_view.h"
0014 #include "google/protobuf/io/zero_copy_stream.h"
0015
0016
0017 #include "google/protobuf/port_def.inc"
0018
0019 namespace google {
0020 namespace protobuf {
0021 namespace compiler {
0022 namespace objectivec {
0023
0024
0025
0026
0027
0028 class PROTOC_EXPORT LineConsumer {
0029 public:
0030 LineConsumer() = default;
0031 virtual ~LineConsumer() = default;
0032 virtual bool ConsumeLine(absl::string_view line, std::string* out_error) = 0;
0033 };
0034
0035 bool PROTOC_EXPORT ParseSimpleFile(absl::string_view path,
0036 LineConsumer* line_consumer,
0037 std::string* out_error);
0038
0039 bool PROTOC_EXPORT ParseSimpleStream(io::ZeroCopyInputStream& input_stream,
0040 absl::string_view stream_name,
0041 LineConsumer* line_consumer,
0042 std::string* out_error);
0043
0044 }
0045 }
0046 }
0047 }
0048
0049 #include "google/protobuf/port_undef.inc"
0050
0051 #endif