Yes, I am thinking about your main concerns. So could you give me a pseudo-code about the file determined parser/reader? I am not clear about how is the top design. 

Something similar to CSVFile? e.g., 
```
CLibSVMFile* svmfile = CLibSVMFile(fname);
SGMatrix<float64_t> mat=SGMatrix<float64_t>();
mat.load(svmfile);
```