Make OP tree walking a C++ class