Make the C++ generator use non-hardcoded namespaces.

- Make the C++ generator use program->get_namespace("cpp")
  instead of program->get_cpp_namespace()
- Eliminate the explicit "cpp_namespace" in t_program.
- Deprecate the cpp_namespace token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
index 7bd189f..bb68358 100644
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -254,11 +254,13 @@
         g_program->set_namespace($2, $3);
       }
     }
+/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */
 | tok_cpp_namespace tok_identifier
     {
+      pwarning(1, "'cpp_namespace' is deprecated. Use 'namespace cpp' instead");
       pdebug("Header -> tok_cpp_namespace tok_identifier");
       if (g_parse_mode == PROGRAM) {
-        g_program->set_cpp_namespace($2);
+        g_program->set_namespace("cpp", $2);
       }
     }
 | tok_cpp_include tok_literal