libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcBackendDataWrapper class is a wrapper around the SGFInfo data structure that is defined by the SGFC backend. SgfcBackendDataWrapper is responsible for managing the memory of an SGFInfo object. More...
#include <SgfcBackendDataWrapper.h>
Public Member Functions | |
SgfcBackendDataWrapper () | |
Initializes a newly constructed SgfcBackendDataWrapper object that wraps an empty SGFInfo data structure. SGFC save operations that use the SGFInfo object will write data to a memory buffer. The data state is SgfcBackendDataState::NotLoaded. | |
SgfcBackendDataWrapper (const std::string &sgfContent) | |
Initializes a newly constructed SgfcBackendDataWrapper object that wraps an SGFInfo data structure that contains a file buffer with a duplicate of the content of sgfContent. SGFC save operations that use the SGFInfo object will write data to a memory buffer. The data state is SgfcBackendDataState::PartiallyLoaded. | |
virtual | ~SgfcBackendDataWrapper () |
Destroys and cleans up the SgfcBackendDataWrapper object. | |
SGFInfo * | GetSgfData () const |
Returns a pointer to the SGFInfo data object that the SgfcBackendDataWrapper encapsulates. | |
Friends | |
class | SgfcBackendController |
The SgfcBackendDataWrapper class is a wrapper around the SGFInfo data structure that is defined by the SGFC backend. SgfcBackendDataWrapper is responsible for managing the memory of an SGFInfo object.
When SgfcBackendDataWrapper is constructed it immediately allocates the memory for a basic empty SGFInfo object that does not contain any data yet.
While SgfcBackendDataWrapper lives, clients can access the SGFInfo object for the following purposes:
When SgfcBackendDataWrapper is destroyed, it deallocates all memory that is currently occupied by the SGFInfo object. It doesn't matter whether an SGFC backend load and/or save operation have been performed since construction.