#include "taperpars.hh" TaperPars::TaperPars(std::string arg) { char sep=';'; // axis data separator size_t pos=0; // size_t posc=0; std::string arg1 = ""; // axis data int ierr; while ((arg1=findit(arg,sep,pos,arg1,ierr)) != "") { // cerr<<"pos = "<(arg1,sep1,pos1,arg2,ierr)) != "") { // cerr<<"pos1 = "<key = arg2; else { RVL::RVLException e; e<<"ERROR: read_taperdata\n"; e<<" failed to read axis key\n"; throw e; } } else if (pidx==1) { if (arg2=="") { RVL::RVLException e; e<<"ERROR: read_taperdata\n"; e<<" failed to read corner coordinates string\n"; throw e; } else { char sep2=','; size_t pos2=0; std::string arg3=""; int tidx = 0; while ((tidx < NCORNER) && ((arg3=findit(arg2,sep2,pos2,td->t[tidx],ierr)) != "")) tidx++; if (tidx != NCORNER) { RVL::RVLException e; e<<"ERROR: read_taperdata\n"; e<<" failed to read "<key = t.tdata[i]->key; for (int j=0; jt[j] = t.tdata[i]->t[j]; this->tdata.push_back(td); } } TaperPars::~TaperPars() { for (int i=0; itdata.size(); i++) delete tdata[i]; } TAPERDATA const & TaperPars::operator[](size_t i) const { if (i < tdata.size()) return *(tdata[i]); else { RVL::RVLException e; e<<"ERROR: TaperPars::operator[]\n"; e<<" index "<t)[NCORNER-1]; str<<"\n"; } return str; }