A characterization of uniformly bounded cosine functions generators