Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

matvec::ParmMap Class Reference

#include <parmMap.h>

List of all members.

Public Methods

void inputParms (std::string fileName)
double getDoubleValue (std::string parmName)
unsigned getUnsignedValue (std::string parmName)


Member Function Documentation

double matvec::ParmMap::getDoubleValue std::string    parmName
 

Definition at line 46 of file parmMap.cpp.

00046                                                         {
00047                 ParmMap::iterator mapit = find(parmName);
00048                 if(mapit== end()){
00049                         std::cerr << "Unrecognized parameter: " << parmName << std::endl;
00050                         throw exception("ParmMap::getDoubleValue: Error\n");
00051                 }
00052                 std::string parmValue = mapit->second;
00053                 std::istringstream istr(parmValue);
00054                 double doubleValue;
00055                 istr >> doubleValue;
00056                 return doubleValue;
00057         }

unsigned matvec::ParmMap::getUnsignedValue std::string    parmName
 

Definition at line 59 of file parmMap.cpp.

Referenced by matvec::Model::RSampler().

00059                                                             {
00060                 ParmMap::iterator mapit = find(parmName);
00061                 if(mapit== end()){
00062                         std::cerr << "Unrecognized parameter: " << parmName << std::endl;
00063                         throw exception("ParmMap::getUnsignedValue: Error\n");;
00064                 }
00065                 std::string parmValue = mapit->second;
00066                 std::istringstream istr(parmValue);
00067                 unsigned unsignedValue;
00068                 istr >> unsignedValue;
00069                 return unsignedValue;
00070         }

void matvec::ParmMap::inputParms std::string    fileName
 

Definition at line 30 of file parmMap.cpp.

Referenced by matvec::Model::RSampler().

00030                                                    {
00031                 std::ifstream inFile(fileName.c_str());
00032                 std:: string parmName, parmValue;
00033                 ParmMap::iterator mapit;
00034                 while (inFile >> parmName >> parmValue){
00035                         mapit = find(parmName);
00036                         if(mapit== end()){
00037                                 std::cerr << "Unrecognized parameter: " << parmName << std::endl;
00038                                 throw exception("ParmMap::inputParms: Error\n");
00039                         }
00040                         else {
00041                                 mapit->second = parmValue;
00042                         }
00043                 }
00044         }


The documentation for this class was generated from the following files:
Generated on Thu Jun 16 17:14:42 2005 for Matvec by doxygen1.2.16