Order preserving functions and generalized convexity