A class to read an object of type T, even if the type on file is different. More...
< T, TConvertorFamily >
|AnyTypeReader (std::string filename)|
|initialize with the name of the file to be read. More...|
|void||read (T &out)|
|read file and get result. More...|
A class to read an object of type T, even if the type on file is different.
Conversion is taken care of by convertor classes, indexed by the TConvertorFamily "template typename". These convertors have to be able to allocate the output if necessary. NB: error checking during conversion is left to the convertors – no tests are done inside AnyTypeReader to check that the conversion succeeded, or even that a convertion is possible at all. Therefore, it is as safe as the Convertors you provide.
If you want to read an image as an AimsData<float>, whatever the type on file:
|typedef AnyTypeReaderProcess<T, TConvertorFamily> aims::AnyTypeReader< T, TConvertorFamily >::Base|
|void aims::AnyTypeReader< T, TConvertorFamily >::read||(||T &||out||)|