These are repeated quite a lot.  Can you have the C++ code add it, or use an #include?