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 fb882a9..7181697 100644
--- a/compiler/cpp/src/parse/t_field.h
+++ b/compiler/cpp/src/parse/t_field.h
@@ -10,6 +10,8 @@
#include <string>
#include <boost/lexical_cast.hpp>
+#include "t_doc.h"
+
// Forward declare for xsd_attrs
class t_struct;
@@ -19,7 +21,7 @@
*
* @author Mark Slee <mcslee@facebook.com>
*/
-class t_field {
+class t_field : public t_doc {
public:
t_field(t_type* type, std::string name) :
type_(type),
@@ -100,19 +102,6 @@
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 @@
bool xsd_nillable_;
t_struct* xsd_attrs_;
- std::string doc_;
- bool has_doc_;
-
};
#endif