The replicative model of evolution: A general theory