diff options
Diffstat (limited to 'src/google/protobuf/util/internal/error_listener.h')
-rw-r--r-- | src/google/protobuf/util/internal/error_listener.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/google/protobuf/util/internal/error_listener.h b/src/google/protobuf/util/internal/error_listener.h index e3baa224..c2b7560d 100644 --- a/src/google/protobuf/util/internal/error_listener.h +++ b/src/google/protobuf/util/internal/error_listener.h @@ -42,23 +42,27 @@ #include <google/protobuf/util/internal/location_tracker.h> #include <google/protobuf/stubs/stringpiece.h> +#include <google/protobuf/port_def.inc> + namespace google { namespace protobuf { namespace util { namespace converter { // Interface for error listener. -class LIBPROTOBUF_EXPORT ErrorListener { +class PROTOBUF_EXPORT ErrorListener { public: virtual ~ErrorListener() {} // Reports an invalid name at the given location. virtual void InvalidName(const LocationTrackerInterface& loc, - StringPiece invalid_name, StringPiece message) = 0; + StringPiece invalid_name, + StringPiece message) = 0; // Reports an invalid value for a field. virtual void InvalidValue(const LocationTrackerInterface& loc, - StringPiece type_name, StringPiece value) = 0; + StringPiece type_name, + StringPiece value) = 0; // Reports a missing required field. virtual void MissingField(const LocationTrackerInterface& loc, @@ -73,18 +77,20 @@ class LIBPROTOBUF_EXPORT ErrorListener { }; // An error listener that ignores all errors. -class LIBPROTOBUF_EXPORT NoopErrorListener : public ErrorListener { +class PROTOBUF_EXPORT NoopErrorListener : public ErrorListener { public: NoopErrorListener() {} - virtual ~NoopErrorListener() override {} + ~NoopErrorListener() override {} - virtual void InvalidName(const LocationTrackerInterface& loc, - StringPiece invalid_name, StringPiece message) override {} + void InvalidName(const LocationTrackerInterface& loc, + StringPiece invalid_name, + StringPiece message) override {} - virtual void InvalidValue(const LocationTrackerInterface &loc, StringPiece type_name, + void InvalidValue(const LocationTrackerInterface& loc, + StringPiece type_name, StringPiece value) override {} - virtual void MissingField(const LocationTrackerInterface &loc, + void MissingField(const LocationTrackerInterface& loc, StringPiece missing_name) override {} private: @@ -95,6 +101,8 @@ class LIBPROTOBUF_EXPORT NoopErrorListener : public ErrorListener { } // namespace converter } // namespace util } // namespace protobuf - } // namespace google + +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_ERROR_LISTENER_H__ |