C++ stateupdate.cpp template uses inheritance and imports