diff options
Diffstat (limited to 'gentools/templ.cpp')
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientOperations.h.tmpl | 34 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl | 22 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientProxy.h.tmpl | 35 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl | 4 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerOperations.h.tmpl | 28 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl | 18 | ||||
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerProxy.h.tmpl | 34 | ||||
| -rw-r--r-- | gentools/templ.cpp/MethodBodyClass.h.tmpl | 2 |
8 files changed, 50 insertions, 127 deletions
diff --git a/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl index 996c919443..d4edfddd89 100644 --- a/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl +++ b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl @@ -26,48 +26,26 @@ %{VLIST} * ${major}-${minor} */ -#include <sstream> - #ifndef _AMQP_ClientOperations_ #define _AMQP_ClientOperations_ -#include <FieldTable.h> -#include <FramingContent.h> -#include <ProtocolVersion.h> -#include <ProtocolVersionException.h> -#include "MethodContext.h" +#include "ProtocolVersion.h" namespace qpid { namespace framing { -class AMQP_ClientProxy; +class MethodContext; class AMQP_ClientOperations { -protected: - ProtocolVersion version; - AMQP_ClientOperations() {} - public: - AMQP_ClientOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {} - AMQP_ClientOperations(const ProtocolVersion& version) : version(version) {} virtual ~AMQP_ClientOperations() {} - inline u_int8_t getMajor() const { return version.getMajor(); } - inline u_int8_t getMinor() const { return version.getMinor(); } - inline const ProtocolVersion& getVersion() const { return version; } - inline bool isVersion(u_int8_t _major, u_int8_t _minor) const - { - return version.equals(_major, _minor); - } - inline bool isVersion(const ProtocolVersion& _version) const - { - return version.equals(_version); - } + virtual ProtocolVersion getVersion() const = 0; + + // Include framing constant declarations + #include <AMQP_Constants.h> - // Include framing constant declarations - #include <AMQP_Constants.h> - // Inner classes %{CLIST} ${coh_inner_class} diff --git a/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl b/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl index e9ca5756e2..6a0e6eedb3 100644 --- a/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl +++ b/gentools/templ.cpp/AMQP_ClientProxy.cpp.tmpl @@ -25,30 +25,28 @@ * Supported AMQP versions: %{VLIST} * ${major}-${minor} */ - #include <sstream> - -#include <AMQP_ClientProxy.h> -#include <AMQFrame.h> +#include "AMQP_ClientProxy.h" #include "framing/ChannelAdapter.h" +#include "framing/amqp_types_full.h" %{MLIST} ${cpc_method_body_include} namespace qpid { namespace framing { -AMQP_ClientProxy::AMQP_ClientProxy(OutputHandler* out, u_int8_t major, u_int8_t minor) : -%{CLIST} ${cpc_constructor_initializer} - -{} - // Inner class instance get methods +AMQP_ClientProxy::AMQP_ClientProxy(ChannelAdapter& ch) : + Proxy(ch)%{CLIST} ${cpc_constructor_initializer} + {} + + // Inner class instance get methods %{CLIST} ${cpc_inner_class_get_method} - // Inner class implementation + // Inner class implementation %{CLIST} ${cpc_inner_class_impl} -} /* namespace framing */ -} /* namespace qpid */ +}} // namespae qpid::framing + diff --git a/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl b/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl index f5ad0106be..4b3932d309 100644 --- a/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl +++ b/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl @@ -29,45 +29,28 @@ #ifndef _AMQP_ClientProxy_ #define _AMQP_ClientProxy_ -#include <AMQP_ClientOperations.h> -#include <FieldTable.h> -#include <FramingContent.h> -#include <OutputHandler.h> +#include "framing/Proxy.h" namespace qpid { namespace framing { -class AMQP_ClientProxy : public AMQP_ClientOperations +class AMQP_ClientProxy : public Proxy { -private: - - ProtocolVersion version; - OutputHandler* out; -%{CLIST} ${cph_handler_pointer_defn} - public: - AMQP_ClientProxy(OutputHandler* out, u_int8_t major, u_int8_t minor); - const ProtocolVersion& getProtocolVersion() {return version;} - virtual ~AMQP_ClientProxy() {} - - // Get methods for handlers + AMQP_ClientProxy(ChannelAdapter& ch); -%{CLIST} ${cph_handler_pointer_get_method} - - // Inner class definitions + // Inner class definitions %{CLIST} ${cph_inner_class_defn} -private: - // Inner class instances - -%{CLIST} ${cph_inner_class_instance} - -public: - // Inner class instance get methods + // Inner class instance get methods %{CLIST} ${cph_inner_class_get_method} +private: + // Inner class instances + +%{CLIST} ${cph_inner_class_instance} }; /* class AMQP_ClientProxy */ } /* namespace framing */ diff --git a/gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl b/gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl index dc2a890c88..6fc79180b2 100644 --- a/gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl +++ b/gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl @@ -27,8 +27,8 @@ */ #include <sstream> - -#include <AMQP_MethodVersionMap.h> +#include "framing/ProtocolVersionException.h" +#include "AMQP_MethodVersionMap.h" namespace qpid { diff --git a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl index c6db6f002a..aca065c757 100644 --- a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl +++ b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl @@ -29,43 +29,25 @@ #ifndef _AMQP_ServerOperations_ #define _AMQP_ServerOperations_ -#include <FieldTable.h> -#include <FramingContent.h> -#include <ProtocolVersion.h> -#include <ProtocolVersionException.h> -#include "MethodContext.h" +#include "ProtocolVersion.h" namespace qpid { namespace framing { -class AMQP_ServerProxy; -class AMQP_ClientProxy; +class MethodContext; class AMQP_ServerOperations { protected: ProtocolVersion version; - AMQP_ServerOperations() {} public: - AMQP_ServerOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {} - AMQP_ServerOperations(const ProtocolVersion& version) : version(version) {} virtual ~AMQP_ServerOperations() {} - inline u_int8_t getMajor() const { return version.getMajor(); } - inline u_int8_t getMinor() const { return version.getMinor(); } - inline const ProtocolVersion& getVersion() const { return version; } - inline bool isVersion(u_int8_t _major, u_int8_t _minor) const - { - return version.equals(_major, _minor); - } - inline bool isVersion(const ProtocolVersion& _version) const - { - return version.equals(_version); - } + virtual ProtocolVersion getVersion() const = 0; - // Include framing constant declarations - #include <AMQP_Constants.h> + // Include framing constant declarations + #include "AMQP_Constants.h" // Inner classes diff --git a/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl b/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl index c5c1e17bad..5575f3b1df 100644 --- a/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl +++ b/gentools/templ.cpp/AMQP_ServerProxy.cpp.tmpl @@ -27,27 +27,25 @@ */ #include <sstream> - -#include <AMQP_ServerProxy.h> -#include <AMQFrame.h> +#include "AMQP_ServerProxy.h" #include "framing/ChannelAdapter.h" +#include "framing/amqp_types_full.h" %{MLIST} ${spc_method_body_include} namespace qpid { namespace framing { -AMQP_ServerProxy::AMQP_ServerProxy(OutputHandler* out, u_int8_t major, u_int8_t minor) : -%{CLIST} ${spc_constructor_initializer} -{} +AMQP_ServerProxy::AMQP_ServerProxy(ChannelAdapter& ch) : + Proxy(ch)%{CLIST} ${spc_constructor_initializer} + {} - // Inner class instance get methods + // Inner class instance get methods %{CLIST} ${spc_inner_class_get_method} - // Inner class implementation + // Inner class implementation %{CLIST} ${spc_inner_class_impl} -} /* namespace framing */ -} /* namespace qpid */ +}} // namespae qpid::framing diff --git a/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl b/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl index 3206359fb6..69638e325c 100644 --- a/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl +++ b/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl @@ -29,44 +29,28 @@ #ifndef _AMQP_ServerProxy_ #define _AMQP_ServerProxy_ -#include <AMQP_ServerOperations.h> -#include <FieldTable.h> -#include <FramingContent.h> -#include <OutputHandler.h> +#include "framing/Proxy.h" namespace qpid { namespace framing { -class AMQP_ServerProxy : public AMQP_ServerOperations +class AMQP_ServerProxy : public Proxy { -private: - ProtocolVersion version; - OutputHandler* out; -%{CLIST} ${sph_handler_pointer_defn} - public: - AMQP_ServerProxy(OutputHandler* out, u_int8_t major, u_int8_t minor); - const ProtocolVersion& getProtocolVersion() {return version;} - virtual ~AMQP_ServerProxy() {} - - // Get methods for handlers + AMQP_ServerProxy(ChannelAdapter& ch); -%{CLIST} ${sph_handler_pointer_get_method} - - // Inner class definitions + // Inner class definitions %{CLIST} ${sph_inner_class_defn} + // Inner class instance get methods + +%{CLIST} ${sph_inner_class_get_method} + private: - // Inner class instances + // Inner class instances %{CLIST} ${sph_inner_class_instance} - -public: - // Inner class instance get methods - -%{CLIST} ${sph_inner_class_get_method} - }; /* class AMQP_ServerProxy */ } /* namespace framing */ diff --git a/gentools/templ.cpp/MethodBodyClass.h.tmpl b/gentools/templ.cpp/MethodBodyClass.h.tmpl index 91d094a440..2031f8e346 100644 --- a/gentools/templ.cpp/MethodBodyClass.h.tmpl +++ b/gentools/templ.cpp/MethodBodyClass.h.tmpl @@ -62,7 +62,7 @@ public: ${mb_constructor_with_initializers} - ${CLASS}${METHOD}Body(const ProtocolVersion& version): ${mb_base_class}(version) {} + ${CLASS}${METHOD}Body(ProtocolVersion version): ${mb_base_class}(version) {} virtual ~${CLASS}${METHOD}Body() {} // Attribute get methods |
