Layer Switcher port for c++