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

Provide extension points for custom properties and property values #6

Open
herzbube opened this issue Sep 21, 2020 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@herzbube
Copy link
Owner

herzbube commented Sep 21, 2020

For custom properties that make use of the 9 SGF data types a nice idea would be to expose the internal value type descriptor system in a simplified fashion. The main problem with this approach is that libsgfc++ cannot rely on a number of preprocessing steps done by SGFC for the well-known properties that are defined in the SGF standard. At least the following preprocessing steps come to mind, but likely there are more:

  • Removal of unnecessary escape characters in SimpleText and Text values
  • Line break handling in SimpleText and Text values
  • Handling of invalid values for the primitive data types (Number, Real, Color, Double)

For custom properties with values that have a custom format a solution is needed where the library client can inject its own types, together with its own text-to-value and value-to-text conversion logic.

@herzbube
Copy link
Owner Author

When this issue is implemented, look at re-introducing support for game-specific properties. Cf. issue #35.

Also check out commit d69f639 where preliminary support for many properties was removed. It might be possible to simply re-add much of the code that was removed in the commit.

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

No branches or pull requests

1 participant