diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2006-10-25 20:15:28 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2006-10-25 20:15:28 +0000 |
| commit | c07e58d50b7a6d54b12732db1e6613a87f21660c (patch) | |
| tree | c22bc23d2c178d93c6891b407b08a94f24921ae4 /gentools/templ.cpp | |
| parent | 8da6e337e89a5af2cbe7d4b1a649f417c05b7cda (diff) | |
| download | qpid-python-c07e58d50b7a6d54b12732db1e6613a87f21660c.tar.gz | |
Some code tidy-up and debugging; first C++ templates and implementation of most of C++ MethodBody class generation methods.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@467750 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gentools/templ.cpp')
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientHandlerImpl.cpp.tmpl | 46 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientHandlerImpl.h.tmpl | 54 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientOperations.h.tmpl | 53 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl | 45 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientProxy.h.tmpl | 55 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerHandlerImpl.cpp.tmpl | 46 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerHandlerImpl.h.tmpl | 54 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerOperations.h.tmpl | 53 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl | 45 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerProxy.h.tmpl | 57 | ||||
| -rw-r--r-- | gentools/templ.cpp/MethodBodyClass.h.tmpl | 139 | ||||
| -rw-r--r-- | gentools/templ.cpp/amqp_methods.cpp.tmpl | 42 | ||||
| -rw-r--r-- | gentools/templ.cpp/amqp_methods.h.tmpl | 41 |
13 files changed, 730 insertions, 0 deletions
diff --git a/gentools/templ.cpp/AMQP_ClientHandlerImpl.cpp.tmpl b/gentools/templ.cpp/AMQP_ClientHandlerImpl.cpp.tmpl new file mode 100644 index 0000000000..3b4795132b --- /dev/null +++ b/gentools/templ.cpp/AMQP_ClientHandlerImpl.cpp.tmpl @@ -0,0 +1,46 @@ +&{AMQP_ClientHandlerImpl.cpp} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include "AMQP_ClientHandlerImpl.h" + +namespace qpid { +namespace framing { + +AMQP_ClientHandlerImpl::AMQP_ClientHandlerImpl() +{CLIST} {chp_initializers} +{} + +AMQP_ClientHandlerImpl::~AMQP_ClientHandlerImpl() +{ +{CLIST} {chp_destructor} +} + +// Handler Stubs + +{CLIST} {chp_handler_stubs} + +} /* namespace framing */ +} /* namespace qpid */ + diff --git a/gentools/templ.cpp/AMQP_ClientHandlerImpl.h.tmpl b/gentools/templ.cpp/AMQP_ClientHandlerImpl.h.tmpl new file mode 100644 index 0000000000..0cf94e24a0 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ClientHandlerImpl.h.tmpl @@ -0,0 +1,54 @@ +&{AMQP_ClientHandlerImpl.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ClientHandlerImpl_ +#define _AMQP_ClientHandlerImpl_ + +#include "AMQP_ClientOperations.h" +#include "qpid/framing/FieldTable.h" + +namespace qpid { +namespace framing { + +class AMQP_ClientHandlerImpl : virtual public AMQP_ClientOperations +{ +{CLIST} {chh_handler_pointer_declarations} + + public: + AMQP_ClientHandlerImpl(); + virtual ~AMQP_ClientHandlerImpl(); + +{CLIST} {chh_handler_pointer_get_methods} + + // Inner class handler declarations + +{CLIST} {shh_class_handler_declarations} + +}; /* AMQP_ClientHandlerImpl */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl new file mode 100644 index 0000000000..bdc3d6c694 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl @@ -0,0 +1,53 @@ +&{AMQP_ClientOperations.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ClientOperations_ +#define _AMQP_ClientOperations_ + +#include "AMQP_Constants.h" +#include "qpid/framing/FieldTable.h" + +namespace qpid { +namespace framing { + +class AMQP_ClientOperations +{ + public: + AMQP_ClientOperations() {} + virtual ~AMQP_ClientOperations() {} +{so_get_amqp_major} +{so_get_amqp_minor} + + // Method handler get methods +{CLIST} {co_method_handler_get_method} + +{CLIST} {co_cleint method_inner_class} + +}; /* class AMQP_ClientOperations */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl b/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl new file mode 100644 index 0000000000..7ecd3e0a7e --- /dev/null +++ b/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl @@ -0,0 +1,45 @@ +&{AMQP_ClientProxy.cpp} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include "AMQP_ClientProxy.h" + +namespace qpid { +namespace framing { + +AMQP_ClientProxy::AMQP_ClientProxy(OutputHandler* _out) : + out(_out) +{CLIST} {cpc_constructor_initializer} +{} + + // Inner class instance get methods + +{CLIST} {cpc_inner_class_get_method} + + // Inner class implementation + +{CLIST} {cpc_inner_class_impl} + +} /* namespace framing */ +} /* namespace qpid */ diff --git a/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl b/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl new file mode 100644 index 0000000000..82ba5391d5 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl @@ -0,0 +1,55 @@ +&{AMQP_ClientProxy.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ClientProxy_ +#define _AMQP_ClientProxy_ + +#include "AMQP_ClientOperations.h" +#include "qpid/framing/FieldTable.h" +#include "qpid/framing/OutputHandler.h" + +namespace qpid { +namespace framing { + +class AMQP_ClientProxy : virtual public AMQP_ClientOperations +{ + public: + AMQP_ClientProxy(OutputHandler* _out); + virtual ~AMQP_ClientProxy() {}; + + // Inner class instances + +{CLIST} {cph_inner_class_get_method} + + // Inner class definitions + +{CLIST} {cph_inner_class_impl} + +}; /* class AMQP_ClientProxy */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/AMQP_ServerHandlerImpl.cpp.tmpl b/gentools/templ.cpp/AMQP_ServerHandlerImpl.cpp.tmpl new file mode 100644 index 0000000000..879ac83702 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ServerHandlerImpl.cpp.tmpl @@ -0,0 +1,46 @@ +&{AMQP_ServerHandlerImpl.cpp} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include "AMQP_ServerHandlerImpl.h" + +namespace qpid { +namespace framing { + +AMQP_ServerHandlerImpl::AMQP_ServerHandlerImpl() +{CLIST} {shp_initializers} +{} + +AMQP_ServerHandlerImpl::~AMQP_ServerHandlerImpl() +{ +{CLIST} {shp_destructor} +} + +// Handler Stubs + +{CLIST} {shp_handler_stubs} + +} /* namespace framing */ +} /* namespace qpid */ + diff --git a/gentools/templ.cpp/AMQP_ServerHandlerImpl.h.tmpl b/gentools/templ.cpp/AMQP_ServerHandlerImpl.h.tmpl new file mode 100644 index 0000000000..cd34880a60 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ServerHandlerImpl.h.tmpl @@ -0,0 +1,54 @@ +&{AMQP_ServerHandlerImpl.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ServerHandlerImpl_ +#define _AMQP_ServerHandlerImpl_ + +#include "AMQP_ServerOperations.h" +#include "qpid/framing/FieldTable.h" + +namespace qpid { +namespace framing { + +class AMQP_ServerHandlerImpl : virtual public AMQP_ServerOperations +{ +{CLIST} {shh_handler_pointer_declarations} + + public: + AMQP_ServerHandlerImpl(); + virtual ~AMQP_ServerHandlerImpl(); + +{CLIST} {chh_handler_pointer_get_methods} + + // Inner class handler declarations + +{CLIST} {shh_class_handler_declarations} + +}; /* AMQP_ServerHandlerImpl */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl new file mode 100644 index 0000000000..26c06d42a2 --- /dev/null +++ b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl @@ -0,0 +1,53 @@ +&{AMQP_ServerOperations.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ServerOperations_ +#define _AMQP_ServerOperations_ + +#include "AMQP_Constants.h" +#include "qpid/framing/FieldTable.h" + +namespace qpid { +namespace framing { + +class AMQP_ServerOperations +{ + public: + AMQP_ServerOperations() {} + virtual ~AMQP_ServerOperations() {} +{so_get_amqp_major} +{so_get_amqp_minor} + + // Method handler get methods +{CLIST} {co_method_handler_get_method} + +{CLIST} {co_server_method_inner_class} + +}; /* class AMQP_ServerOperations */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl b/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl new file mode 100644 index 0000000000..8996f4a41c --- /dev/null +++ b/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl @@ -0,0 +1,45 @@ +&{AMQP_ServerProxy.cpp} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include "AMQP_ServerProxy.h" + +namespace qpid { +namespace framing { + +AMQP_ServerProxy::AMQP_ServerProxy(OutputHandler* _out) : + out(_out) +{CLIST} {spc_constructor_initializer} +{} + + // Inner class instance get methods + +{CLIST} {spc_inner_class_get_method} + + // Inner class implementation + +{CLIST} {spc_inner_class_impl} + +} /* namespace framing */ +} /* namespace qpid */ diff --git a/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl b/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl new file mode 100644 index 0000000000..a1bc3cbc9f --- /dev/null +++ b/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl @@ -0,0 +1,57 @@ +&{AMQP_ServerProxy.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef _AMQP_ServerProxy_ +#define _AMQP_ServerProxy_ + +#include "AMQP_ServerOperations.h" +#include "qpid/framing/FieldTable.h" +#include "qpid/framing/OutputHandler.h" + +namespace qpid { +namespace framing { + +class AMQP_ServerProxy : virtual public AMQP_ServerOperations +{ + OutputHandler* out; + + public: + AMQP_ServerProxy(OutputHandler* _out); + virtual ~AMQP_ServerProxy() {} + + // Inner class instances + +{CLIST} {sph_inner_class_get_method} + + // Inner class definitions + +{CLIST} {sph_inner_class_impl} + +}; /* class AMQP_ServerProxy */ + +} /* namespace framing */ +} /* namespace qpid */ + +#endif diff --git a/gentools/templ.cpp/MethodBodyClass.h.tmpl b/gentools/templ.cpp/MethodBodyClass.h.tmpl new file mode 100644 index 0000000000..b89f7c5c3d --- /dev/null +++ b/gentools/templ.cpp/MethodBodyClass.h.tmpl @@ -0,0 +1,139 @@ +&{${CLASS}${METHOD}Body.h} +/* + * + * Copyright (c) 2006 The Apache Software Foundation + * + * Licensed 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. + * + */ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include <map> +#include <string> +#include <sstream> + +#include "qpid/framing/amqp_types.h" +#include "AMQP_ServerOperations.h" +#include "qpid/framing/AMQMethodBody.h" +#include "qpid/framing/Buffer.h" +#include "qpid/framing/FieldTable.h" + +#ifndef _${CLASS}${METHOD}Body_ +#define _${CLASS}${METHOD}Body_ + +namespace qpid { +namespace framing { + +class ${CLASS}${METHOD}Body : virtual public AMQMethodBody +{ + static std::map<std::string, int> classIdMap; + static std::map<std::string, int> methodIdMap; + static void initMaps() + { + if (classIdMap.empty()) + { +${CLASS_ID_INIT} + } + if (methodIdMap.empty()) + { +${METHOD_ID_INIT} + } + } + + /* Method field declarations */ + +%{FLIST} ${mb_field_declaration} + + +public: + typedef std::tr1::shared_ptr<${CLASS}${METHOD}Body> shared_ptr; + + ${CLASS}${METHOD}Body(u_int_8 major, u_int_8 minor) + { + super(major, minor); + initMaps(); + } + virtual ~${CLASS}${METHOD}Body() {} + +%{FLIST} ${mb_field_get_method} + + inline void print(std::ostream& out) const + { + out << "${CLASS}${METHOD}"; +%{FLIST} ${mb_field_print} + } + + inline u_int16_t amqpClassId() const + { + std::stringstream ss; + ss << major << "-" << minor; + return classIdMap[ss.str()]; + } + + inline u_int16_t amqpMethodId() const + { + std::stringstream ss; + ss << major << "-" << minor; + return methodIdMap[ss.str()]; + } + + inline u_int32_t bodySize() const + { + u_int32_t size = 0; +%{FLIST} ${mb_body_size} + return size; + } + + inline void encodeContent(Buffer& buffer) const + { +%{FLIST} ${mb_encode} + } + + inline void decodeContent(Buffer& buffer) + { +%{FLIST} ${mb_decode} + } + + inline void invoke(AMQP_ServerOperations& target, u_int16_t channel) + { + target.getBasicHandler()->consume( +%{FLIST} ${mb_field_list} + ); + } + + inline BasicConsumeBody( +%{FLIST} ${mb_field_list_declare} + ) : +%{FLIST} ${mb_field_list_initializer} + { + } + + inline BasicConsumeBody() + { + } +}; /* class ${CLASS}${METHOD}Body */ + +// Static member declarations +std::map<string, int> ${CLASS}${METHOD}Body::classIdMap; +std::map<string, int> ${CLASS}${METHOD}Body::methodIdMap; + +} /* namespace framing */ +} /* namespace qpid */ + +#endif + diff --git a/gentools/templ.cpp/amqp_methods.cpp.tmpl b/gentools/templ.cpp/amqp_methods.cpp.tmpl new file mode 100644 index 0000000000..d301b2b0b9 --- /dev/null +++ b/gentools/templ.cpp/amqp_methods.cpp.tmpl @@ -0,0 +1,42 @@ +&{amqp_methods.cpp} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#include "amqp_methods.h" +#include "qpid/QpidError.h" + +namespace qpid { +namespace framing { + +AMQMethodBody* createAMQMethodBody(u_int16_t classId, u_int16_t methodId, u_int8_t major, u_int8_t minor) +{ + switch(classId * 1000 + methodId) + { +{MLIST} {m_create_method_body_class} + } + THROW_QPID_ERROR(FRAMING_ERROR, "Unknown method"); +} /* createAMQMethodBody() */ + +} /* namespace framing */ +} /* namespace qpid */ diff --git a/gentools/templ.cpp/amqp_methods.h.tmpl b/gentools/templ.cpp/amqp_methods.h.tmpl new file mode 100644 index 0000000000..51f84242f8 --- /dev/null +++ b/gentools/templ.cpp/amqp_methods.h.tmpl @@ -0,0 +1,41 @@ +&{amqp_methods.h} +/** +* +* Copyright (c) 2006 The Apache Software Foundation +* +* Licensed 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. +* +*/ + +/* + * This file is auto-generated by ${GENERATOR} - do not modify. + * Supported AMQP versions: +%{VLIST} * ${major}-${minor} + */ + +#ifndef AMQ_METHODS_H +#define AMQ_METHODS_H + +{MLIST} {m_method_body_class_indlude} + +namespace qpid { +namespace framing { + +{MLIST} {m_method_body_class_instance} + +AMQMethodBody* createAMQMethodBody(u_int16_t classId, u_int16_t methodId); + +} /* namespace framing */ +} /* namespace qpid */ + +#endif |
