From f011bd4312a8b780a91ad011d6e1f16a36448af8 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 29 Oct 2008 00:07:45 +0000 Subject: [PATCH] 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 --- compiler/cpp/src/parse/t_field.h | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) 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 -- 2.17.1