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
game-of-go sgf

Build Status Github Releases Github Releases

What is it?

libsgfc++ is a C++ wrapper library around SGFC. As such, libsgfc++ offers the same functionality as SGFC:

libsgfc++ is not restricted to files, it also reads and writes SGF data from/to std::string without filesystem interaction.

SGFC is written in pure C. libsgfc++ adds an object-oriented API layer written in C++ on top of that.

libsgfc++ is cross-platform. It builds on the three major desktop operating systems (macOS, Linux, Windows) as well as on iOS. Other platforms may work as well but have not been tested.

What it's not

The limitations of SGFC also apply to libsgfc++. Quoting from the SGFC website:

SGFC is intended to be a tool for SGF experts, coders and maintainers of large SGF archives. You ought to have quite some knowledge of SGF to use SGFC efficiently.

SGFC was written primarily for Go/WeiQi/Baduk (GM[1]) files. It can't handle other games yet, i.e. it doesn't check any game-specific properties and values of other games than Go. It may even save erronous game-specific properties of other games! Use SGFC for other games with care.

Dependencies

At runtime libsgfc++ depends on the C/C++ runtime library, the C++ standard library and possibly (depending on the platform) an iconv library.

At build time libsgfc++ has the following dependencies:

  1. The main dependency, of course, is SGFC. A transitive dependency inherited from SGFC is iconv (more on that see below).
  2. The second dependency is the unit test library Catch2.
  3. The third dependency is the build management tool CMake.
  4. A last dependency is Doxygen, used to optionally generate the project's API documentation.

SGFC and Catch2 are integrated via Git submodule.

iconv is integrated differently depending on the platform:

Project build system

The project build system is documented here.

More documentation

Acknowledgment

Thanks to Arno Hollosi, for writing SGFC in the first place, and for responding to an initial alpha version of libsgfc++ with a virtual whirlwind of changes to SGFC to make it much more library-friendly.

License

libsgfc++ is released under the Apache License (2.0). Here's the link to the license file.

SGFC is released under the terms of the BSD License.

Catch2 is released under the Boost Software License (1.0).