This example serves as a demo for a custom model implementation which can be used by Wt's item View classes, such as WTreeView.
A WStandardItemModel can be populated with data retrieved from for example a database. A draw-back is however that all data must be retrieved in advance and is kept in session memory. By reimplementing WAbstractItemModel, you can however implement a model that reads (or computes) the data only when needed, and provides a trade-off between keeping data in memory or fetching it from the source.
In this example, we implement a tree model that navigates a git repository. The model lazy-stores folder nodes in memory, but reads all other data directly from git. Initially we thought the SHA-1 id's could be used, but folders with the same content in different places of the git repository have the same SHA-1 ID's while representing different model indexes.