The family approach to total cocompleteness and toposes