From: David Reiss Date: Wed, 29 Oct 2008 00:07:45 +0000 (+0000) Subject: Make t_field inherit from t_doc instead of reimplementing it X-Git-Tag: 0.2.0~418 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=f011bd4312a8b780a91ad011d6e1f16a36448af8;p=common%2Fthrift.git Make t_field inherit from t_doc instead of reimplementing it git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@708736 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/parse/t_field.h b/compiler/cpp/src/parse/t_field.h index fb882a96..71816976 100644 --- a/compiler/cpp/src/parse/t_field.h +++ b/compiler/cpp/src/parse/t_field.h @@ -10,6 +10,8 @@ #include #include +#include "t_doc.h" + // Forward declare for xsd_attrs class t_struct; @@ -19,7 +21,7 @@ class t_struct; * * @author Mark Slee */ -class t_field { +class t_field : public t_doc { public: t_field(t_type* type, std::string name) : type_(type), @@ -100,19 +102,6 @@ class t_field { return xsd_attrs_; } - const std::string& get_doc() const { - return doc_; - } - - bool has_doc() { - return has_doc_; - } - - void set_doc(const std::string& doc) { - doc_ = doc; - has_doc_ = true; - } - // This is not the same function as t_type::get_fingerprint_material, // but it does the same thing. std::string get_fingerprint_material() const { @@ -132,9 +121,6 @@ class t_field { bool xsd_nillable_; t_struct* xsd_attrs_; - std::string doc_; - bool has_doc_; - }; #endif