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

cif_write() should handle empty loops by outputting a placeholder packet #11

Open
jcbollinger opened this issue Jan 12, 2016 · 0 comments

Comments

@jcbollinger
Copy link
Contributor

The cif_write() function currently has no special handling for loops without any packets. It conditions its implicit promise of well formed CIF output on the premise that the input data conform to the CIF data model. Function cif_container_prune() exists to help the user ensure that.

However, it would be preferable to produce well-formed output unconditionally. It is impractical to prevent an in-memory CIF from containing empty loops, so cif_write() should deal with them. There are two reasonable possibilities:

  • Such loops could be suppressed
  • Such loops could be given a synthetic packet containing all unknown-value placeholders

The latter would be more easily implemented within the current framework.

In any case, perhaps it would be best for the choice of behavior to be controlled by an option.

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

1 participant