Silmor . de
Site Links:
Impressum / Publisher

Cheshire Cats

One of the more advanced C++ techniques to hide data from the outside and to stay binary compatible while changing data members and functionality in a class is called "Cheshire Cat". In simplified terms: you hide all the data behind a single pointer data member, whose content is not known inside the header file. This technique is also referred to as "PImpl" (pointer implementation), "compiler firewall" or simply "d-pointer".

There are quite a few tutorials out there:

Chester is my own implementation of helpers for the Cheshire Cat in C++. It is compatible with any standards conformant C++ compiler - I myself use it with Qt based projects. You can get the source here:

svn co https://silmor.de/svn/softmagic/chester/trunk chester
git clone git://silmor.de/konrad/chester.git chester

The GIT version is the more current one of the two.

Or have a look at it here: SVN Web, GIT Web

The project consists of header files only, so there is no need to compile anything, except the documentation - simply call doxygen inside the main path and then read html/index.html for more details.

The source is under a permissive license - you can use it in any project.

Chester is work in progress: as I discover new use cases for Cheshire Cats I will continue to add macros and documentation.


Webmaster: webmaster AT silmor DOT de