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

Getter for presence="constant" fields in generated encoders #531

Closed
zyulyaev opened this issue Dec 7, 2017 · 0 comments
Closed

Getter for presence="constant" fields in generated encoders #531

zyulyaev opened this issue Dec 7, 2017 · 0 comments

Comments

@zyulyaev
Copy link
Contributor

zyulyaev commented Dec 7, 2017

It's sometimes very handy to be able to get constant field values in encoders. Consider following composite type:

<composite name="Price">
    <type name="mantissa" primitiveType="int64"/>
    <type name="exponent" primitiveType="int8" presence="constant">-7</type>
</composite>

If you encode some price value given in double, you need to know the value of the exponent, but now there is no way to get it from an encoder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants