Thrift: Allow whole program doctext.

Summary:
Allow docstrings at the top of the program.

Blame Rev: 52687

Reviewed By: mcslee

Test Plan:
../compiler/cpp/thrift -cpp DocTest.thrift
(with dump_docs on)
and looked at the output.
Generated C++ is identical to installed thrift.

Revert Plan: Do 52687 also.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665183 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h
index 8b4f59c..f54ed71 100644
--- a/compiler/cpp/src/parse/t_program.h
+++ b/compiler/cpp/src/parse/t_program.h
@@ -14,6 +14,7 @@
 // For program_name()
 #include "main.h"
 
+#include "t_doc.h"
 #include "t_scope.h"
 #include "t_base_type.h"
 #include "t_typedef.h"
@@ -41,7 +42,7 @@
  *
  * @author Mark Slee <mcslee@facebook.com>
  */
-class t_program {
+class t_program : public t_doc {
  public:
   t_program(std::string path, std::string name) :
     path_(path),