Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

FileReader Class Reference

#include <filereader.h>

List of all members.

Static Public Member Functions

bool fileexists (const char *filename)
 test for file existence

bool fileexists (string filename)
 test for file existence - string version

bool setdatadir (const char *command)
char * getdatadir (void)
string getdatadirasstring (void)
valarray< yieldPoint > * buildYieldPointArray (string filename)
 Read data from a file to create an array of yield points which can be used to construct a yield curve object.

valarray< CreditSpreadPoint > * buildCreditSpreadPointArray (string filename)
 Read data from a file to create an array of credit spread points which can be used to construct a credit curve object.

volsurfaceparamsbuildVolSurfaceParams (string filename)
 Read data from a file to create an array of strikes and maturities which can be used to construct a vol surface object.


Static Protected Attributes

char _datadir [128] = ""


Member Function Documentation

valarray< CreditSpreadPoint > * FileReader::buildCreditSpreadPointArray string  filename  )  [static]
 

Read data from a file to create an array of credit spread points which can be used to construct a credit curve object.

Parameters:
filename - source of data
Returns:
valarray of CreditSpreadPoints or null pointer if file not found

Definition at line 132 of file filereader.cpp.

References CC_MAX_NUM_SPREADS, CreditSpreadType, fileexists(), and Natural.

Referenced by importData::importCreditCurve(), and maincreditcurve().

volsurfaceparams * FileReader::buildVolSurfaceParams string  filename  )  [static]
 

Read data from a file to create an array of strikes and maturities which can be used to construct a vol surface object.

Parameters:
filename - source of data
Returns:
structure containing strikes, maturities, etc.

Definition at line 185 of file filereader.cpp.

References volsurfaceparams::callputprices, fileexists(), volsurfaceparams::iscallputprices, volsurfaceparams::maturities, Natural, and volsurfaceparams::strikes.

Referenced by importData::importVolSurface(), and mainvolsurface().

valarray< yieldPoint > * FileReader::buildYieldPointArray string  filename  )  [static]
 

Read data from a file to create an array of yield points which can be used to construct a yield curve object.

Parameters:
filename - source of data
Returns:
valarray of yieldPoints or null pointer if file not found

Definition at line 79 of file filereader.cpp.

References fileexists(), Natural, TypeOfRate, and YC_MAX_NUMBER_POINTS.

Referenced by importData::importYieldCurve(), mainasset(), maincreditcurve(), mainIRVanillaSwap(), and mainyieldcurve().

bool FileReader::fileexists string  filename  )  [static]
 

test for file existence - string version

Parameters:
filename - file to test
Returns:
true if file exists, otherwise false

Definition at line 27 of file filereader.cpp.

References fileexists().

bool FileReader::fileexists const char *  filename  )  [static]
 

test for file existence

Parameters:
filename - file to test
Returns:
true if file exists, otherwise false

Definition at line 12 of file filereader.cpp.

Referenced by buildCreditSpreadPointArray(), buildVolSurfaceParams(), buildYieldPointArray(), fileexists(), fr_basic(), importData::runUserDefinedInterface(), and setdatadir().

char* FileReader::getdatadir void   )  [inline, static]
 

Definition at line 17 of file filereader.h.

References _datadir.

string FileReader::getdatadirasstring void   )  [inline, static]
 

Definition at line 18 of file filereader.h.

References _datadir.

Referenced by fr_basic(), mainasset(), maincreditcurve(), mainIRVanillaSwap(), mainyieldcurve(), importData::runInterface(), and importData::runUserDefinedInterface().

bool FileReader::setdatadir const char *  command  )  [static]
 

Definition at line 31 of file filereader.cpp.

References _datadir, and fileexists().

Referenced by importData::importData(), and maintests().


Member Data Documentation

char FileReader::_datadir = "" [static, protected]
 

Definition at line 6 of file filereader.cpp.

Referenced by getdatadir(), getdatadirasstring(), and setdatadir().


The documentation for this class was generated from the following files:
Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:39 2005 for terreneuve by doxygen 1.3.6