MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / StringErrorCollector

Class StringErrorCollector

tensorflow/core/util/proto/proto_utils.h:40–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 protobuf::Message* output);
39
40class StringErrorCollector : public protobuf::io::ErrorCollector {
41 public:
42 // String error_text is unowned and must remain valid during the use of
43 // StringErrorCollector.
44 explicit StringErrorCollector(string* error_text);
45 // If one_indexing is set to true, all line and column numbers will be
46 // increased by one for cases when provided indices are 0-indexed and
47 // 1-indexed error messages are desired
48 StringErrorCollector(string* error_text, bool one_indexing);
49 StringErrorCollector(const StringErrorCollector&) = delete;
50 StringErrorCollector& operator=(const StringErrorCollector&) = delete;
51
52 // Implementation of protobuf::io::ErrorCollector::AddError.
53 void AddError(int line, int column, const string& message) override;
54
55 // Implementation of protobuf::io::ErrorCollector::AddWarning.
56 void AddWarning(int line, int column, const string& message) override;
57
58 private:
59 string* const error_text_;
60 const int index_offset_;
61};
62
63// Converts an absl::Duration to a google::protobuf::Duration.
64inline google::protobuf::Duration ToDurationProto(absl::Duration duration) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68