summaryrefslogtreecommitdiff
path: root/cpp/rubygen/templates/structs.rb
Commit message (Collapse)AuthorAgeFilesLines
* Generate code for both 0-99 preview and 0-10 final specs .Alan Conway2008-02-271-538/+0
| | | | | | | 0-10 final: extended code generation and non-generated support classes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@631638 13f79535-47bb-0310-9956-ffa450edef68
* Fix for QPID-639: c++ now includes sizes for all structs (enabled the same ↵Gordon Sim2007-11-071-7/+54
| | | | | | in python & java) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592895 13f79535-47bb-0310-9956-ffa450edef68
* Fix to QPID-640. The fields actually set/encoded are now tracked explicitly.Gordon Sim2007-11-071-43/+105
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592753 13f79535-47bb-0310-9956-ffa450edef68
* * Summary: generalized Invoker visitor to all *Operations andAlan Conway2007-10-161-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | *Handler classes, client and broker. Single template free function invoke(Invocable, const AMQBody&); works for all invocable handlers. * rubygen/templates/OperationsInvoker.rb: Generates invoker visitors for all Operations classes, client and server. * src/qpid/framing/Invoker.h: Invoker base class and template invoke() function. * rubygen/templates/structs.rb: add generic invoke method template to invoke an arbitrary object with the correct memeber function. * src/qpid/framing/AMQMethodBody.cpp, .h: Removed invoke(), replaced by qpid::framing::invoke() * src/qpid/broker/SemanticHandler.cpp, ConnectionHandler.cpp: Replace AMQMethodBody::invoke with invoke() free function. * src/qpid/framing/StructHelper.h: Avoid un-necessary alloc and copy in encode/decode. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585223 13f79535-47bb-0310-9956-ffa450edef68
* Enabled packed struct encoding in python, cpp, and java. Also fixed ↵Rafael H. Schloming2007-10-141-22/+27
| | | | | | computation of required byte credit in Message.cpp. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@584474 13f79535-47bb-0310-9956-ffa450edef68
* Some revisions to rubygen for packed structs and execution header (changes ↵Gordon Sim2007-09-271-27/+135
| | | | | | not yet enabled) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580094 13f79535-47bb-0310-9956-ffa450edef68
* In ClientChannel: Use subscribe and flush in place of get; use ↵Gordon Sim2007-09-121-1/+1
| | | | | | | | | | per-subscriber flow control for managing prefetches. In brokers Session: set credit to 0 when subscription is created (modified python tests accordingly) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@574979 13f79535-47bb-0310-9956-ffa450edef68
* Moved old ClientChannel class from using basic to using message for publish ↵Gordon Sim2007-09-111-0/+3
| | | | | | | | | | & consume. (Get and qos still use the basic class's defintions, that will be changed next) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@574551 13f79535-47bb-0310-9956-ffa450edef68
* Implementation of execution.result on the client side Gordon Sim2007-09-061-8/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@573359 13f79535-47bb-0310-9956-ffa450edef68
* * rubygen/cppgen.rb: Use class Uuid for AMQP uuids.Alan Conway2007-08-291-2/+1
| | | | | | | * rubygen/templates/structs.rb: Use class Uuid for AMQP uuids. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570595 13f79535-47bb-0310-9956-ffa450edef68
* Updated message.transfer encoding to use header and content segments ↵Gordon Sim2007-08-281-0/+20
| | | | | | | | | | (including new structs). Unified more between the basic and message classes messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570538 13f79535-47bb-0310-9956-ffa450edef68
* * rubygen/cppgen.rb: Use uint rather than u_int form for consistency.Alan Conway2007-08-271-1/+1
| | | | | | | * rubygen/amqpgen.rb: Removed unnecessary sorting. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570111 13f79535-47bb-0310-9956-ffa450edef68
* * rubygen/amqpgen.rb: Performance and API improvements.Alan Conway2007-08-271-37/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added nodes for all amqp.xml elements except doc, assert and rule. (They can easily be added.) In particular AmqpDomain is a proper node, providing a place to do type mapping. Every node has reader methods for AMQP attributes/elements: - attr() for each AMQP attribute "attr" returns the string value. - foos() returns AmqpElements for all the "foo" children. - foo(name) returns AmqpElements for the named "foo" child domain() returns an AmqpDomain rather than the string name. Method names that would clash with Object methods get a trailing "_" So: class_/classes, method_/methods_, type_/types Notes: - no amqp_ prefixes. - AmqpElement does not inherit REXML::Element, AmqpElement#xml() to get the REXML element. Performance: all templates run in 2.8 seconds on my laptop, compared to almost two minutes previously. Main change was to replace xpath searches with simple descent of the Amqp model and cache values selectively based on profiling. * rubygen/cppgen.rb: - Updated for amqpgen changes. - Introduced CppType to manage C++ type information - Moved all type mapping to CppType/AmqpDomain Some templates still do their own type calculations, these should be centralized in CppType so they can be re-used. * rubygen/templates/*: Updated for new API * src/qpid/framing/amqp_types_full.h: Added Uuid.h * xml/cluster.xml: change "type" attribute to "domain" git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570096 13f79535-47bb-0310-9956-ffa450edef68
* Reapply rev 568249 with the changes made to the generator this time, rather ↵Gordon Sim2007-08-221-39/+0
| | | | | | than the generated file itself. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568517 13f79535-47bb-0310-9956-ffa450edef68
* Undo revision 568249, causing tests to hang.Alan Conway2007-08-211-0/+39
| | | | | | | | | | | | | ------------------------------------------------------------------------ r568249 | gsim | 2007-08-21 16:11:20 -0400 (Tue, 21 Aug 2007) | 3 lines Invocation now uses the visitor mechanism ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568298 13f79535-47bb-0310-9956-ffa450edef68
* Invocation now uses the visitor mechanismGordon Sim2007-08-211-39/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568249 13f79535-47bb-0310-9956-ffa450edef68
* Refresh of transitional xml to more closely reflect latest specificationGordon Sim2007-08-211-0/+345
Initial execution-result support (not yet handled on c++ client) Generation is now all done through the ruby code (it is a little slower at present I'm afraid, will try to speed it up over the next weeks) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568174 13f79535-47bb-0310-9956-ffa450edef68