I think your class API has to be close to cv::Algorithm API (as we suppose that your class will be inherited from cv::Algorithm by OpenCV guys one day). So please just implement the following read/write methods:

virtual void write(FileStorage& fs) const;
virtual void read(const FileNode& fn);