int ProgressLogger::get_depth() const { int depth = 1; for(ProgressLogger* i = get_subtask(); i != NULL; i = i->get_subtask()) depth += 1; return depth; }