cpp: Add model template, and generate and build model