On classes defining an homological dimension