From 5d1df1b78ccc6e2cfc6cc96deb773e9fe21d1caa Mon Sep 17 00:00:00 2001 From: "Darryl L. Pierce" Date: Tue, 27 Nov 2012 18:07:49 +0000 Subject: QPID-4207 : Relocated all swig .i files to the include directory. Updated the build systems to use the new locations. Updated all other .i files to not use relative paths when referencing them. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1414294 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/CMakeLists.txt | 9 +++++ cpp/Makefile.am | 3 +- cpp/bindings/qmf/python/CMakeLists.txt | 2 +- cpp/bindings/qmf/python/Makefile.am | 2 +- cpp/bindings/qmf/python/python.i | 2 +- cpp/bindings/qmf/qmfengine.i | 59 --------------------------- cpp/bindings/qmf/ruby/CMakeLists.txt | 4 +- cpp/bindings/qmf/ruby/Makefile.am | 2 +- cpp/bindings/qmf/ruby/ruby.i | 2 +- cpp/bindings/qmf2/python/CMakeLists.txt | 2 +- cpp/bindings/qmf2/python/Makefile.am | 2 +- cpp/bindings/qmf2/python/python.i | 4 +- cpp/bindings/qmf2/qmf2.i | 66 ------------------------------- cpp/bindings/qmf2/ruby/Makefile.am | 2 +- cpp/bindings/qmf2/ruby/ruby.i | 4 +- cpp/bindings/qpid/Makefile.am | 4 +- cpp/bindings/qpid/perl/CMakeLists.txt | 9 ++++- cpp/bindings/qpid/perl/perl.i | 4 +- cpp/bindings/qpid/python/CMakeLists.txt | 8 +++- cpp/bindings/qpid/python/Makefile.am | 2 +- cpp/bindings/qpid/python/python.i | 4 +- cpp/bindings/qpid/qpid.i | 70 --------------------------------- cpp/bindings/qpid/ruby/CMakeLists.txt | 4 +- cpp/bindings/qpid/ruby/Makefile.am | 2 +- cpp/bindings/qpid/ruby/ruby.i | 4 +- cpp/include/qmf/qmf2.i | 66 +++++++++++++++++++++++++++++++ cpp/include/qmf/qmfengine.i | 59 +++++++++++++++++++++++++++ cpp/include/qpid/qpid.i | 70 +++++++++++++++++++++++++++++++++ 28 files changed, 247 insertions(+), 224 deletions(-) delete mode 100644 cpp/bindings/qmf/qmfengine.i delete mode 100644 cpp/bindings/qmf2/qmf2.i delete mode 100644 cpp/bindings/qpid/qpid.i create mode 100644 cpp/include/qmf/qmf2.i create mode 100644 cpp/include/qmf/qmfengine.i create mode 100644 cpp/include/qpid/qpid.i (limited to 'cpp') diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 0a3b1149ba..6f506a5b0e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -68,6 +68,15 @@ set (QPIDD_CONF_FILE ${QPIDD_CONF_PATH} CACHE STRING "Name of the Qpid broker configuration file") install(FILES LICENSE NOTICE DESTINATION ${QPID_INSTALL_DOCDIR}) +install(FILES xml/cluster.xml + bindings/swig_perl_typemaps.i + bindings/swig_python_typemaps.i + bindings/swig_ruby_typemaps.i + DESTINATION ${QPID_INSTALL_DATADIR}) +install(FILES include/qpid/qpid.i + include/qmf/qmfengine.i + include/qmf/qmf2.i + DESTINATION ${QPID_INSTALL_INCLUDEDIR}) if (WIN32) set (CMAKE_DEBUG_POSTFIX "d") diff --git a/cpp/Makefile.am b/cpp/Makefile.am index 8a06948c3e..569bf5f774 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -27,6 +27,7 @@ EXTRA_DIST = \ xml/cluster.xml INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \ packaging/NSIS QPID_VERSION.txt bindings/CMakeLists.txt \ bindings/swig_python_typemaps.i bindings/swig_ruby_typemaps.i bindings/swig_perl_typemaps.i + include/qpid/qpid.i include/qmf/qmfengine.i include/qmf/qmf2.i SUBDIRS = managementgen etc src docs/api docs/man examples bindings/qmf bindings/qpid bindings/qmf2 @@ -36,4 +37,4 @@ libtool: $(LIBTOOL_DEPS) check-long: all $(MAKE) -C src/tests check-long - \ No newline at end of file + diff --git a/cpp/bindings/qmf/python/CMakeLists.txt b/cpp/bindings/qmf/python/CMakeLists.txt index adeb1db78a..1768df7f85 100644 --- a/cpp/bindings/qmf/python/CMakeLists.txt +++ b/cpp/bindings/qmf/python/CMakeLists.txt @@ -21,7 +21,7 @@ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") swig_add_module(qmfengine_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(qmfengine_python qmf qmfconsole ${PYTHON_LIBRARIES}) diff --git a/cpp/bindings/qmf/python/Makefile.am b/cpp/bindings/qmf/python/Makefile.am index bcef8c6b53..07f3c1072b 100644 --- a/cpp/bindings/qmf/python/Makefile.am +++ b/cpp/bindings/qmf/python/Makefile.am @@ -29,7 +29,7 @@ EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 -$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmfengine.i +$(generated_file_list): $(srcdir)/python.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o qmfengine.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) diff --git a/cpp/bindings/qmf/python/python.i b/cpp/bindings/qmf/python/python.i index 5e25d155f9..118d0d3dbd 100644 --- a/cpp/bindings/qmf/python/python.i +++ b/cpp/bindings/qmf/python/python.i @@ -139,5 +139,5 @@ -%include "../qmfengine.i" +%include "qmf/qmfengine.i" diff --git a/cpp/bindings/qmf/qmfengine.i b/cpp/bindings/qmf/qmfengine.i deleted file mode 100644 index eb350115a3..0000000000 --- a/cpp/bindings/qmf/qmfengine.i +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -%{ - -#include "qmf/engine/Agent.h" -#include "qmf/engine/Console.h" -#include "qmf/engine/ResilientConnection.h" - -%} - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include - - -%inline { - -using namespace std; -using namespace qmf::engine; - -namespace qmf { -namespace engine { - -} -} -} - - -%{ - -%}; - diff --git a/cpp/bindings/qmf/ruby/CMakeLists.txt b/cpp/bindings/qmf/ruby/CMakeLists.txt index ce853b767b..1fb2542e46 100644 --- a/cpp/bindings/qmf/ruby/CMakeLists.txt +++ b/cpp/bindings/qmf/ruby/CMakeLists.txt @@ -22,7 +22,9 @@ ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) -include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include) +include_directories(${RUBY_INCLUDE_DIRS} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) swig_add_module(qmfengine_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(qmfengine_ruby qmf qmfconsole ${RUBY_LIBRARY}) diff --git a/cpp/bindings/qmf/ruby/Makefile.am b/cpp/bindings/qmf/ruby/Makefile.am index 1c7f67edb3..33393aeda0 100644 --- a/cpp/bindings/qmf/ruby/Makefile.am +++ b/cpp/bindings/qmf/ruby/Makefile.am @@ -29,7 +29,7 @@ rubylibdir = $(RUBY_LIB) dist_rubylib_DATA = qmf.rb -qmfengine.cpp: $(srcdir)/ruby.i $(srcdir)/../qmfengine.i +qmfengine.cpp: $(srcdir)/ruby.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o qmfengine.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) diff --git a/cpp/bindings/qmf/ruby/ruby.i b/cpp/bindings/qmf/ruby/ruby.i index 0101861100..2854aa0c7e 100644 --- a/cpp/bindings/qmf/ruby/ruby.i +++ b/cpp/bindings/qmf/ruby/ruby.i @@ -102,5 +102,5 @@ } -%include "../qmfengine.i" +%include "qmf/qmfengine.i" diff --git a/cpp/bindings/qmf2/python/CMakeLists.txt b/cpp/bindings/qmf2/python/CMakeLists.txt index 2a823ff1ee..1c8447116e 100644 --- a/cpp/bindings/qmf2/python/CMakeLists.txt +++ b/cpp/bindings/qmf2/python/CMakeLists.txt @@ -21,7 +21,7 @@ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") swig_add_module(cqmf2_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(cqmf2_python qmf2 ${PYTHON_LIBRARIES}) diff --git a/cpp/bindings/qmf2/python/Makefile.am b/cpp/bindings/qmf2/python/Makefile.am index 591c1408c0..8277b444ed 100644 --- a/cpp/bindings/qmf2/python/Makefile.am +++ b/cpp/bindings/qmf2/python/Makefile.am @@ -29,7 +29,7 @@ EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 -$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_python_typemaps.i +$(generated_file_list): $(srcdir)/python.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) diff --git a/cpp/bindings/qmf2/python/python.i b/cpp/bindings/qmf2/python/python.i index 02dd1632b0..39193a2475 100644 --- a/cpp/bindings/qmf2/python/python.i +++ b/cpp/bindings/qmf2/python/python.i @@ -19,7 +19,7 @@ %module cqmf2 %include "std_string.i" -%include "../../swig_python_typemaps.i" +%include "swig_python_typemaps.i" /* Define the general-purpose exception handling */ %exception { @@ -37,5 +37,5 @@ } } -%include "../qmf2.i" +%include "qmf/qmf2.i" diff --git a/cpp/bindings/qmf2/qmf2.i b/cpp/bindings/qmf2/qmf2.i deleted file mode 100644 index 0f573fe3e6..0000000000 --- a/cpp/bindings/qmf2/qmf2.i +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -%{ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -%} - -%include -%include -%include - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include - -%{ - -using namespace qmf; - -%}; - diff --git a/cpp/bindings/qmf2/ruby/Makefile.am b/cpp/bindings/qmf2/ruby/Makefile.am index a03bd6d5e6..f681401be2 100644 --- a/cpp/bindings/qmf2/ruby/Makefile.am +++ b/cpp/bindings/qmf2/ruby/Makefile.am @@ -27,7 +27,7 @@ SWIG_FLAGS = -w362,401 rubylibdir = $(RUBY_LIB) -cqmf2.cpp: $(srcdir)/ruby.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_ruby_typemaps.i +cqmf2.cpp: $(srcdir)/ruby.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) diff --git a/cpp/bindings/qmf2/ruby/ruby.i b/cpp/bindings/qmf2/ruby/ruby.i index 82c963c7d6..f97b918eda 100644 --- a/cpp/bindings/qmf2/ruby/ruby.i +++ b/cpp/bindings/qmf2/ruby/ruby.i @@ -21,7 +21,7 @@ /* Ruby doesn't have a != operator*/ #pragma SWIG nowarn=378 %include "std_string.i" -%include "../../swig_ruby_typemaps.i" +%include "swig_ruby_typemaps.i" /* Define the general-purpose exception handling */ %exception { @@ -34,4 +34,4 @@ } } -%include "../qmf2.i" +%include "qmf2.i" diff --git a/cpp/bindings/qpid/Makefile.am b/cpp/bindings/qpid/Makefile.am index b3849a6d28..3e51e28dfb 100644 --- a/cpp/bindings/qpid/Makefile.am +++ b/cpp/bindings/qpid/Makefile.am @@ -21,7 +21,7 @@ SUBDIRS = dotnet if HAVE_SWIG -EXTRA_DIST = qpid.i +EXTRA_DIST = CMakeLists.txt qpid.i if HAVE_RUBY_DEVEL SUBDIRS += ruby @@ -39,7 +39,7 @@ EXTRA_DIST += perl/perl.i perl/CMakeLists.txt BUILT_SOURCES = perl/cqpid_perl.cpp SWIG_FLAGS = -w362,401 -perl/cqpid_perl.cpp: $(srcdir)/perl/perl.i $(srcdir)/qpid.i $(srcdir)/../swig_perl_typemaps.i +perl/cqpid_perl.cpp: $(srcdir)/perl/perl.i $(SWIG) -perl -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o perl/cqpid_perl.cpp $(srcdir)/perl/perl.i perl/Makefile: perl/cqpid_perl.cpp diff --git a/cpp/bindings/qpid/perl/CMakeLists.txt b/cpp/bindings/qpid/perl/CMakeLists.txt index 3a47303dd7..4dd78e239e 100644 --- a/cpp/bindings/qpid/perl/CMakeLists.txt +++ b/cpp/bindings/qpid/perl/CMakeLists.txt @@ -21,18 +21,23 @@ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i PROPERTIES CPLUSPLUS ON) -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i + PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") swig_add_module(cqpid_perl perl ${CMAKE_CURRENT_SOURCE_DIR}/perl.i) swig_link_libraries(cqpid_perl qpidmessaging qpidtypes qmf2 ${PERL_LIBRARY}) -set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PERL_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") +include_directories(${PERL_INCLUDE_PATH} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) ##---------------------------------- ## Install the complete Perl binding ##---------------------------------- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_perl.so ${CMAKE_CURRENT_BINARY_DIR}/cqpid_perl.pm + ${CMAKE_CURRENT_SOURCE_DIR}/qpid.pm DESTINATION ${PERL_PFX_ARCHLIB} COMPONENT ${QPID_COMPONENT_CLIENT} ) diff --git a/cpp/bindings/qpid/perl/perl.i b/cpp/bindings/qpid/perl/perl.i index 38ac91761f..aec2ee1c9e 100644 --- a/cpp/bindings/qpid/perl/perl.i +++ b/cpp/bindings/qpid/perl/perl.i @@ -19,7 +19,7 @@ %module cqpid_perl %include "std_string.i" -%include "../../swig_perl_typemaps.i" +%include "swig_perl_typemaps.i" /* Define the general-purpose exception handling */ %exception { @@ -31,5 +31,5 @@ } } -%include "../qpid.i" +%include "qpid/qpid.i" diff --git a/cpp/bindings/qpid/python/CMakeLists.txt b/cpp/bindings/qpid/python/CMakeLists.txt index 4cbdc99245..2693475dea 100644 --- a/cpp/bindings/qpid/python/CMakeLists.txt +++ b/cpp/bindings/qpid/python/CMakeLists.txt @@ -21,12 +21,16 @@ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i + PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") swig_add_module(cqpid_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(cqpid_python qpidmessaging qpidtypes qmf2 ${PYTHON_LIBRARIES}) -set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") +include_directories(${PYTHON_INCLUDE_PATH} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) ##------------------------------------ ## Install the complete Python binding diff --git a/cpp/bindings/qpid/python/Makefile.am b/cpp/bindings/qpid/python/Makefile.am index 432fe7e764..fcd70e8fa5 100644 --- a/cpp/bindings/qpid/python/Makefile.am +++ b/cpp/bindings/qpid/python/Makefile.am @@ -29,7 +29,7 @@ EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 -$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qpid.i $(srcdir)/../../swig_python_typemaps.i +$(generated_file_list): $(srcdir)/python.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o cqpid.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) diff --git a/cpp/bindings/qpid/python/python.i b/cpp/bindings/qpid/python/python.i index 4d8a64b376..b0c990cc8b 100644 --- a/cpp/bindings/qpid/python/python.i +++ b/cpp/bindings/qpid/python/python.i @@ -19,7 +19,7 @@ %module cqpid %include "std_string.i" -%include "../../swig_python_typemaps.i" +%include "swig_python_typemaps.i" /* Needed for get/setPriority methods. Surprising SWIG 1.3.40 doesn't * convert uint8_t by default. */ @@ -159,7 +159,7 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError) %rename(_setTtl) qpid::messaging::Message::setTtl; -%include "../qpid.i" +%include "qpid/qpid.i" %extend qpid::messaging::Connection { %pythoncode %{ diff --git a/cpp/bindings/qpid/qpid.i b/cpp/bindings/qpid/qpid.i deleted file mode 100644 index 352bafa3c8..0000000000 --- a/cpp/bindings/qpid/qpid.i +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -%{ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// -// Wrapper functions for map-decode and list-decode. This allows us to avoid -// the complexity of output parameter mapping. -// -qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message& msg) { - static qpid::types::Variant::Map map; - map.clear(); - qpid::messaging::decode(msg, map); - return map; -} - -qpid::types::Variant::List& decodeList(const qpid::messaging::Message& msg) { - static qpid::types::Variant::List list; - list.clear(); - qpid::messaging::decode(msg, list); - return list; -} - -%} - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include - -qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message&); -qpid::types::Variant::List& decodeList(const qpid::messaging::Message&); - - -%{ - -%}; - diff --git a/cpp/bindings/qpid/ruby/CMakeLists.txt b/cpp/bindings/qpid/ruby/CMakeLists.txt index 17c44c0f46..564f5655c8 100644 --- a/cpp/bindings/qpid/ruby/CMakeLists.txt +++ b/cpp/bindings/qpid/ruby/CMakeLists.txt @@ -31,7 +31,9 @@ set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem) ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) -include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include) +include_directories(${RUBY_INCLUDE_DIRS} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY}) diff --git a/cpp/bindings/qpid/ruby/Makefile.am b/cpp/bindings/qpid/ruby/Makefile.am index a2a5dd76bd..e8bc89e69a 100644 --- a/cpp/bindings/qpid/ruby/Makefile.am +++ b/cpp/bindings/qpid/ruby/Makefile.am @@ -27,7 +27,7 @@ SWIG_FLAGS = -w362,401 rubylibdir = $(RUBY_LIB) -cqpid.cpp: $(srcdir)/ruby.i $(srcdir)/../qpid.i $(srcdir)/../../swig_ruby_typemaps.i +cqpid.cpp: $(srcdir)/ruby.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqpid.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) diff --git a/cpp/bindings/qpid/ruby/ruby.i b/cpp/bindings/qpid/ruby/ruby.i index 13189c93f2..642deb2bcd 100644 --- a/cpp/bindings/qpid/ruby/ruby.i +++ b/cpp/bindings/qpid/ruby/ruby.i @@ -21,7 +21,7 @@ /* Ruby doesn't have a != operator*/ #pragma SWIG nowarn=378 %include "std_string.i" -%include "../../swig_ruby_typemaps.i" +%include "swig_ruby_typemaps.i" /* Define the general-purpose exception handling */ %exception { @@ -34,5 +34,5 @@ } } -%include "../qpid.i" +%include "qpid/qpid.i" diff --git a/cpp/include/qmf/qmf2.i b/cpp/include/qmf/qmf2.i new file mode 100644 index 0000000000..0f573fe3e6 --- /dev/null +++ b/cpp/include/qmf/qmf2.i @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%{ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +%} + +%include +%include +%include + +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include + +%{ + +using namespace qmf; + +%}; + diff --git a/cpp/include/qmf/qmfengine.i b/cpp/include/qmf/qmfengine.i new file mode 100644 index 0000000000..eb350115a3 --- /dev/null +++ b/cpp/include/qmf/qmfengine.i @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%{ + +#include "qmf/engine/Agent.h" +#include "qmf/engine/Console.h" +#include "qmf/engine/ResilientConnection.h" + +%} + +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include + + +%inline { + +using namespace std; +using namespace qmf::engine; + +namespace qmf { +namespace engine { + +} +} +} + + +%{ + +%}; + diff --git a/cpp/include/qpid/qpid.i b/cpp/include/qpid/qpid.i new file mode 100644 index 0000000000..352bafa3c8 --- /dev/null +++ b/cpp/include/qpid/qpid.i @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%{ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +// Wrapper functions for map-decode and list-decode. This allows us to avoid +// the complexity of output parameter mapping. +// +qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message& msg) { + static qpid::types::Variant::Map map; + map.clear(); + qpid::messaging::decode(msg, map); + return map; +} + +qpid::types::Variant::List& decodeList(const qpid::messaging::Message& msg) { + static qpid::types::Variant::List list; + list.clear(); + qpid::messaging::decode(msg, list); + return list; +} + +%} + +%include +%include +%include +%include +%include +%include +%include +%include +%include +%include + +qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message&); +qpid::types::Variant::List& decodeList(const qpid::messaging::Message&); + + +%{ + +%}; + -- cgit v1.2.1