Has function such as to read the file and fill the proper object whose structure mathes with the format of that file.
Static Public Member Functions | |
static SmartPtr< T > | readRegularFile (const std::string &dir_name, const std::string &file_name) |
Reads file and creates T object. |
SmartPtr< T > code::W2FileHandler< T >::readRegularFile | ( | const std::string & | dir_name, | |
const std::string & | file_name | |||
) | [static] |
Reads file and creates T object.
!!!!!! ASSUMPTIONS !!!!!!!
1) All readers have initialized by baseline. If not, call following function before you use this function. Baseline::initialize(); 2) class T has following two functions implemented.
friend InputStream& code::operator >> ( InputStream& s, T& a ) throw (std::string)
friend OutputStream& code::operator << ( OutputStream& s, const T& a ) throw (std::string);
3) The format of the file matches with class T;
dir_name,: | the whole path for NXindex file | |
file_name,: | file name |