Comparison of various methods of replacing virtual functions