diff options
author | Alan Conway <aconway@apache.org> | 2008-02-27 21:49:04 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-02-27 21:49:04 +0000 |
commit | 6bf200b4a953e3e7ae521c1e269e420af7e52cba (patch) | |
tree | f9cbe87cb8c85f6fc902d1d2874139257c4ef6f9 /cpp/src | |
parent | 12ea725d2b2cd95e9a8ef5f4b4511e841054b628 (diff) | |
download | qpid-python-6bf200b4a953e3e7ae521c1e269e420af7e52cba.tar.gz |
Generating domains, structs, commands and controls for 0-10 final spec.
Not yet generating: holders, visitors.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@631740 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Makefile.am | 2 | ||||
-rw-r--r-- | cpp/src/qpid/amqp_0_10/helpers.h | 32 |
2 files changed, 9 insertions, 25 deletions
diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am index 0a63ce1b90..e3b95e045f 100644 --- a/cpp/src/Makefile.am +++ b/cpp/src/Makefile.am @@ -103,6 +103,7 @@ libqpidcommon_la_LIBADD = \ libqpidcommon_la_SOURCES = \ $(rgen_common_cpp) \ $(platform_src) \ + qpid/amqp_0_10/helpers.cpp \ qpid/Serializer.h \ qpid/amqp_0_10/built_in_types.h \ qpid/amqp_0_10/Codec.h \ @@ -251,6 +252,7 @@ libqpidclient_la_SOURCES = \ nobase_include_HEADERS = \ $(platform_hdr) \ + qpid/amqp_0_10/helpers.h \ qpid/assert.h \ qpid/DataDir.h \ qpid/Exception.h \ diff --git a/cpp/src/qpid/amqp_0_10/helpers.h b/cpp/src/qpid/amqp_0_10/helpers.h index c916a3e869..1769d374d9 100644 --- a/cpp/src/qpid/amqp_0_10/helpers.h +++ b/cpp/src/qpid/amqp_0_10/helpers.h @@ -27,46 +27,28 @@ namespace qpid { namespace amqp_0_10 { -/** Static information about an AMQP class */ -struct ClassInfo { uint8_t code; const char* name; }; - -/** Info about a class memeber - command, control or struct */ -struct MemberInfo { - ClassInfo* class_; // 0 for top level struct. - - const char* name; - uint8_t code; - std::string fullName() const { - return std::string(class_->name)+"."+name; - } -}; - -/** Info about a struct */ -struct StructInfo : public MemberInfo { uint8_t size, pack; }; - -// Look up info by code. -const ClassInfo& getClassInfo(uint8_t code); -const MemberInfo& getCommandInfo(uint8_t classCode, uint8_t code); -const MemberInfo& getControlInfo(uint8_t classCode, uint8_t code); -const StructInfo& getStructInfo(uint8_t classCode, uint8_t code); +// Look up names by code +const char* getClassName(uint8_t code); +const char* getCommandName(uint8_t classCode, uint8_t code); +const char* getControlName(uint8_t classCode, uint8_t code); +const char* getStructName(uint8_t classCode, uint8_t code); struct Command { virtual ~Command(); class Visitor; - virtual const MemberInfo& info() const = 0; virtual void accept(Visitor&) const = 0; }; struct Control { virtual ~Control(); class Visitor; - virtual const MemberInfo& info() const = 0; virtual void accept(Visitor&) const = 0; }; struct Struct { virtual ~Struct(); - virtual const StructInfo& info() const = 0; + class Visitor; + virtual void accept(Visitor&) const = 0; }; /** Base class for generated enum domains. |