qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1478582 - in /qpid/trunk/qpid/cpp: configure.ac rubygen/0-10/exceptions.rb rubygen/framing.0-10/Session.rb rubygen/framing.0-10/constants.rb src/CMakeLists.txt src/tests/legacystore/system_test.sh
Date Thu, 02 May 2013 21:47:14 GMT
Author: aconway
Date: Thu May  2 21:47:13 2013
New Revision: 1478582

URL: http://svn.apache.org/r1478582
Log:
QPID-4798: Fix up c++ code generation to use stripped spec files.

The stripped specs have no <doc> elements, this was tripping up the code
generator. Fixed the generator to process <doc> elements if they are present but
to carry on without them if they are not.

Modified:
    qpid/trunk/qpid/cpp/configure.ac
    qpid/trunk/qpid/cpp/rubygen/0-10/exceptions.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/legacystore/system_test.sh

Modified: qpid/trunk/qpid/cpp/configure.ac
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/configure.ac?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/configure.ac (original)
+++ qpid/trunk/qpid/cpp/configure.ac Thu May  2 21:47:13 2013
@@ -247,7 +247,7 @@ fi
 AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$SWIG" &&
test -n "$PERL_INC"])
 
 specdir=`pwd`/$srcdir/../specs
-AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml
+AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.stripped.xml
 AC_SUBST(AMQP_FINAL_XML)
 AM_CONDITIONAL([GENERATE], [test -f $AMQP_FINAL_XML])
 test -f $AMQP_FINAL_XML -a -z "$RUBY" && AC_MSG_ERROR([Missing ruby installation
(try "yum install ruby").])

Modified: qpid/trunk/qpid/cpp/rubygen/0-10/exceptions.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/0-10/exceptions.rb?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/0-10/exceptions.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/0-10/exceptions.rb Thu May  2 21:47:13 2013
@@ -32,7 +32,7 @@ class GenExceptions < CppGen
     enum.choices.each { |c|
       name=c.name.typename+suffix+"Exception"
       genl
-      doxygen_comment { genl c.doc }
+      doxygen_comment { genl c.doc } if c.doc
       struct(name, "public #{base}") {
         genl "#{name}(const std::string& msg=std::string())"
         genl "    : #{base}(#{ns}::#{c.name.shout}, msg) {}"

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb Thu May  2 21:47:13 2013
@@ -34,6 +34,7 @@ class CppGen
   
   # Generates a doxygen comment for AmqpMethod m.
   def doxygen(m)
+    return unless m.doc
     doxygen_comment {
       genl m.doc
       genl
@@ -143,7 +144,8 @@ class SessionNoKeywordGen < CppGen
       namespace(@namespace) { 
         doxygen_comment {
           genl "AMQP #{@amqp.version} #{sync_adjective} session API."
-          genl @amqp.class_("session").doc
+          d = @amqp.class_("session").doc
+          genl d if d
           # FIXME aconway 2008-05-23: additional doc on sync/async use.
         }
         cpp_class(@classname, "public #{@version_base}") {

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb Thu May  2 21:47:13 2013
@@ -135,7 +135,7 @@ EOS
     name=c.name.caps+"Exception"
     value="#{package}::#{enum.parent.name.shout}_#{c.name.shout}"
     genl
-    doxygen_comment { genl c.doc }
+    doxygen_comment { genl c.doc } if c.doc
     struct(c.name.caps+"Exception", base) {
       genl "std::string getPrefix() const { return \"#{c.name}\"; }"
       genl "#{c.name.caps}Exception(const std::string& msg=std::string()) : #{base}(#{value},
\"\"+msg) {}"

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu May  2 21:47:13 2013
@@ -175,7 +175,7 @@ inherit_value ("winver_LEGAL_COPYRIGHT" 
 # present, and if any sources have changed, forcing a re-gen of source code.
 
 set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs)
-set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.xml)
+set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.stripped.xml)
 if (EXISTS ${AMQP_SPEC})
   include(FindRuby)
   include(FindPythonInterp)

Modified: qpid/trunk/qpid/cpp/src/tests/legacystore/system_test.sh
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/legacystore/system_test.sh?rev=1478582&r1=1478581&r2=1478582&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/legacystore/system_test.sh (original)
+++ qpid/trunk/qpid/cpp/src/tests/legacystore/system_test.sh Thu May  2 21:47:13 2013
@@ -28,7 +28,7 @@ if ! test -d "$QPID_DIR" ; then
 fi
 STORE_LIB=../lib/.libs/msgstore.so
 
-xml_spec=$QPID_DIR/specs/amqp.0-10-qpid-errata.xml
+xml_spec=$QPID_DIR/specs/amqp.0-10-qpid-errata.stripped.xml
 test -f $xml_spec || error "$xml_spec not found: invalid \$QPID_DIR ?"
 export PYTHONPATH=$QPID_DIR/python:$QPID_DIR/extras/qmf/src/py:$QPID_DIR/tools/src/py
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message