Reads curve data from a specified input stream, and creates and returns a curve entity.
Returns a smart pointer to the created curve.