You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Kim van der Riet <ki...@redhat.com> on 2007/03/06 17:24:29 UTC

Code generator and changes to the XML (was C++ 0-9 merge heads up)

On Tue, 2007-03-06 at 15:58 +0000, Robert Godfrey wrote:
> I think we should ensure that all our changes are in a separate XML
> file
> from the official AMQP spec.  We can then overlay these on top of the
> official spec at code generation time.
Agreed. This minimized the possibility that changes required for one
implementation will adversely affect the others.

> There is some ability in the code
> generator to do this, but as to whether it would work for the case of
> replacing a method with a new version with an extra argument, I would
> have
> to find by experimentation :-)

The code generator can suppress and/or add additional elements to the
XML down to field level. The only thing it cannot do at present is
insert an additional field into the middle of an existing method's field
list, it will only append the extra field to the end of the field list.
This is something that needs to be added to the generator in the future.

The code generator works in an additive mode, so each additional XML
file read prior to generation will add to the internal model. This
includes the elements that will be suppressed during generation, which
are appended to the elements in question as a special flag in the
internal model. Thus the XML file containing the suppressed elements
should be processed last as the generator needs to find the element to
be suppressed already in the internal model.

The 0-9 trunk currently uses the generator in both additive and suppress
modes.

Kim