Author: dreiss
Date: Tue Oct 28 17:07:45 2008
New Revision: 708736
URL: http://svn.apache.org/viewvc?rev=708736&view=rev
Log:
Make t_field inherit from t_doc instead of reimplementing it
Modified:
incubator/thrift/trunk/compiler/cpp/src/parse/t_field.h
Modified: incubator/thrift/trunk/compiler/cpp/src/parse/t_field.h
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/parse/t_field.h?rev=708736&r1=708735&r2=708736&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/parse/t_field.h (original)
+++ incubator/thrift/trunk/compiler/cpp/src/parse/t_field.h Tue Oct 28 17:07:45
2008
@@ -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 <[EMAIL PROTECTED]>
*/
-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