diff options
Diffstat (limited to 'src/google/protobuf/util/internal/default_value_objectwriter.h')
-rw-r--r-- | src/google/protobuf/util/internal/default_value_objectwriter.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/google/protobuf/util/internal/default_value_objectwriter.h b/src/google/protobuf/util/internal/default_value_objectwriter.h index d15cc7cb..7a8863ca 100644 --- a/src/google/protobuf/util/internal/default_value_objectwriter.h +++ b/src/google/protobuf/util/internal/default_value_objectwriter.h @@ -44,6 +44,8 @@ #include <google/protobuf/util/type_resolver.h> #include <google/protobuf/stubs/stringpiece.h> +#include <google/protobuf/port_def.inc> + namespace google { namespace protobuf { namespace util { @@ -55,7 +57,7 @@ namespace converter { // ObjectWriter when EndObject() is called on the root object. It also writes // out all non-repeated primitive fields that haven't been explicitly rendered // with their default values (0 for numbers, "" for strings, etc). -class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { +class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { public: // A Callback function to check whether a field needs to be scrubbed. // @@ -69,7 +71,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // // The Field* should point to the google::protobuf::Field of "c". typedef ResultCallback2<bool /*return*/, - const std::vector<string>& /*path of the field*/, + const std::vector<std::string>& /*path of the field*/, const google::protobuf::Field* /*field*/> FieldScrubCallBack; @@ -146,11 +148,11 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // "Node" represents a node in the tree that holds the input of // DefaultValueObjectWriter. - class LIBPROTOBUF_EXPORT Node { + class PROTOBUF_EXPORT Node { public: - Node(const string& name, const google::protobuf::Type* type, NodeKind kind, + Node(const std::string& name, const google::protobuf::Type* type, NodeKind kind, const DataPiece& data, bool is_placeholder, - const std::vector<string>& path, bool suppress_empty_list, + const std::vector<std::string>& path, bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, FieldScrubCallBack* field_scrub_callback); virtual ~Node() { @@ -176,9 +178,9 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { virtual void WriteTo(ObjectWriter* ow); // Accessors - const string& name() const { return name_; } + const std::string& name() const { return name_; } - const std::vector<string>& path() const { return path_; } + const std::vector<std::string>& path() const { return path_; } const google::protobuf::Type* type() const { return type_; } @@ -208,7 +210,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { void WriteChildren(ObjectWriter* ow); // The name of this node. - string name_; + std::string name_; // google::protobuf::Type of this node. Owned by TypeInfo. const google::protobuf::Type* type_; // The kind of this node. @@ -226,7 +228,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { bool is_placeholder_; // Path of the field of this node - std::vector<string> path_; + std::vector<std::string> path_; // Whether to suppress empty list output. bool suppress_empty_list_; @@ -246,10 +248,10 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { }; // Creates a new Node and returns it. Caller owns memory of returned object. - virtual Node* CreateNewNode(const string& name, + virtual Node* CreateNewNode(const std::string& name, const google::protobuf::Type* type, NodeKind kind, const DataPiece& data, bool is_placeholder, - const std::vector<string>& path, + const std::vector<std::string>& path, bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, @@ -297,7 +299,7 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // google::protobuf::Type of the root message type. const google::protobuf::Type& type_; // Holds copies of strings passed to RenderString. - std::vector<string*> string_values_; + std::vector<std::string*> string_values_; // The current Node. Owned by its parents. Node* current_; @@ -329,4 +331,6 @@ class LIBPROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { } // namespace protobuf } // namespace google +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_DEFAULT_VALUE_OBJECTWRITER_H__ |