herzbube / libsgfcplusplus

libsgfc++. A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Apache License 2.0
12 stars 2 forks source link

Provide extension points for custom properties and property values #6

Open herzbube opened 4 years ago

herzbube commented 4 years ago

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:

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 commented 3 years ago

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

Also check out commit d69f6395a7158c88865f949dfb542900ff125df7 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.