code::W2FileHandler< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class code::W2FileHandler< T >

Utility class to interact with file system.

Has function such as to read the file and fill the proper object whose structure mathes with the format of that file.

Author:
: Lulin
Version:
:
Id
code_W2FileHandler.h,v 1.12 2009/06/02 20:17:40 lakshman Exp


Static Public Member Functions

static SmartPtr< T > readRegularFile (const std::string &dir_name, const std::string &file_name)
 Reads file and creates T object.


Member Function Documentation

template<class T>
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;

Parameters:
dir_name,: the whole path for NXindex file
file_name,: file name
Returns:
a pointer to object of class T.
In this function, it will first look for file with file_name, if not found, then look for file_name.gz.


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7