C++ class to handle stepper