Thrift support for the xsd_nillable attribute

Reviewed By: dave


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664981 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_field.h b/compiler/cpp/src/parse/t_field.h
index 090426a..dfa5cac 100644
--- a/compiler/cpp/src/parse/t_field.h
+++ b/compiler/cpp/src/parse/t_field.h
@@ -16,14 +16,16 @@
     name_(name),
     key_(0),
     value_(NULL),
-    xsd_optional_(false) {}
+    xsd_optional_(false),
+    xsd_nillable_(false) {}
 
   t_field(t_type* type, std::string name, int32_t key) :
     type_(type),
     name_(name),
     key_(key),
     value_(NULL),
-    xsd_optional_(false) {}
+    xsd_optional_(false),
+    xsd_nillable_(false) {}
 
   ~t_field() {}
 
@@ -55,6 +57,14 @@
     return xsd_optional_;
   }
 
+  void set_xsd_nillable(bool xsd_nillable) {
+    xsd_nillable_ = xsd_nillable;
+  }
+
+  bool get_xsd_nillable() const {
+    return xsd_nillable_;
+  }
+
   void add_xsd_attr(std::string attr) {
     xsd_attrs_.push_back(attr);
   }
@@ -83,6 +93,7 @@
   t_const_value* value_;
 
   bool xsd_optional_;
+  bool xsd_nillable_;
   std::vector<std::string> xsd_attrs_;
 
   std::string doc_;