Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a method when struct has list field #14

Open
jitsni opened this issue Mar 7, 2017 · 0 comments
Open

Generate a method when struct has list field #14

jitsni opened this issue Mar 7, 2017 · 0 comments

Comments

@jitsni
Copy link
Contributor

jitsni commented Mar 7, 2017

http.idl has

struct HttpBeginEx
{
  list<http::HttpHeader> headers;
}

The generated builder has the following method.

    public Builder headers(Consumer<ListFW.Builder<HttpHeaderFW.Builder, HttpHeaderFW>> mutator) 

It would be convenient to have the following method:

    public Builder headers$item(Consumer<HttpHeaderFW.Builder> mutator) {
      headersRW.item(mutator);
      super.limit(headersRW.limit());
      return this;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants