|
Boost : |
Subject: Re: [boost] Better late than never - command line interface to on line code generator
From: Brian Wood (woodbrian77_at_[hidden])
Date: 2015-03-17 22:19:55
Rob Stewart writes:
> On March 17, 2015 4:04:39 PM EDT, Brian Wood <woodbrian77_at_[hidden]>
wrote:
>> In 2007 there was some discussion here about on line
>> code generation:
>
> Online generation of what kinds of code from what kinds of inputs?
>
The output is C++ serialization/middleware code. One thing
it does is automate (and maintain) the creation of serialization
functions.
There are three kinds of input:
1. C++ header files. It doesn't support template definitions,
but it can handle a lot of container classes. Here's an
example of a header it can handle:
http://webEbenezer.net/misc/account_info.hh
.
2. Something called "middle" files. These describe the
messages that you want to send and receive. Here's some
middle code from a file called remote.mdl:
middle_messages_back
@out (messageid_t, std::vector<cmw_account_info>)
@out (messageid_t, cmw::marshalling_integer, cui_generator)
@out (messageid_t)
}
----------------------- end of middle code
-----------------------------------
The name, "middle_messages_back," is used as the name
of a namespace in the generated output. @out means you want
code generated to send a message.
3. Something called a request file that ties the first two types
of input together. Here's an example:
Header account_info.hh
Header cui_generator.hh
Middle-File remote.mdl
Type-Used-for-Constants int16_t
------------------------ end of request file
-------------------------------------
Header files are optional. One middle file is required in a
request file.
And here's the output that's generated from those inputs:
http://webEbenezer.net/misc/zz.middle_messages_back.hh
>>
>> http://webEbenezer.net/build_integration.html
>
> That jumps right into the middle of the topic and assumes prior knowledge
of the
> context.
>
>> So now I would like to ask for further thoughts and
>> feedback. How can it be improved? It has support for some
>> Boost types and I'm open to adding support for more. Tia.
>
> You might start by clarifying the purpose of the tool.
Ok, thanks for your comments.
-- Brian Ebenezer Enterprises http://webEbenezer.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk