kgeorgieva

Untitled

Jun 11th, 2021
617
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. std::getline(if_stream, line);
  2.             lines = atoi(line.c_str());
  3.             std::vector <std::string> new_compounds;
  4.             for(int i = 0; i < lines; i++){
  5.                 tokenized.clear();
  6.                 new_compounds.clear();
  7.                 getline(if_stream, line);
  8.                 tokenize(line, " ", tokenized);
  9.                 std::string new_ID = tokenized[0];
  10.                 std::string new_name = tokenized[1];
  11.                 std::string new_manufacturer = tokenized[2];
  12.                 int count = atoi(tokenized[tokenized.size() - 1].c_str());
  13.                 for(int i = 3; i < tokenized.size() - 1; i++){
  14.                     new_compounds.push_back(tokenized[i]);
  15.                 }
  16.                 if(tokenized[0] == "P" || tokenized[0] == "M"){
  17.                     RNA new_vaccine_(new_ID, new_name, new_manufacturer, new_compounds);
  18.                     //new_vaccine_pair = make_pair(&(new_vaccine_), count);
  19.                     //cout << *new_vaccine_pair.first << " " << new_vaccine_pair.second << std::endl;
  20.                     new_center.set_vaccine(new_vaccine_, count);
  21.                     //std::cout << new_center << std::endl;
  22.                 }else{
  23.                     if(tokenized[0] == "AZ"){
  24.                         ViralVectorBased new_vaccine_(new_ID, new_name, new_manufacturer, new_compounds);
  25.                         //new_vaccine_pair = make_pair(&(new_vaccine_), count);
  26.                         new_center.set_vaccine(new_vaccine_, count);
  27.                     }
  28.                 }
  29.             }
RAW Paste Data