Add interface to new C++ code for modes