22  while (getline(in, line)) {
 
   23    if (line.size() < 2 || line[0] == 
'#') {
 
   26    string type, name, number, comment;
 
   27    stringstream sline(line);
 
   28    getline(sline, type, 
',');
 
   29    getline(sline, name, 
',');
 
   30    getline(sline, number, 
',');
 
   31    getline(sline, comment);
 
   32    csv.
types.emplace_back(type);
 
   33    csv.
names.emplace_back(name);
 
   34    csv.
numbers.emplace_back(number);
 
 
   46int main(
int argc, 
char** argv) {
 
   48    throw runtime_error(
"need at least 4 arguments");
 
   50  string lang = argv[1];     
 
   52  string infile = argv[2];   
 
   53  string outfile = argv[3];  
 
   54  string base = argv[4];     
 
   56      argc > 5 ? argv[5] : 
"some description";   
 
   57  string url = argc > 6 ? argv[6] : 
"some url";  
 
   61    std::cerr << 
"Cannot open input file " << infile << 
"\n";
 
   64  ofstream out(outfile);
 
   66    std::cerr << 
"Cannot open output file " << outfile << 
"\n";
 
   70  Header header{base, description, url};
 
   75  } 
else if (lang == 
"py") {
 
   77  } 
else if (lang == 
"jl") {
 
   79  } 
else if (lang == 
"sh") {
 
   83        "unknown output language requested. I only know hh, py");
 
 
int main(int argc, char **argv)
Helper program to convert an input CSV file, with a format of #type,name,number,comment.
 
void convert(std::ostream &out, const Header &header, const CSV &csv)
 
std::vector< std::string > numbers
 
std::vector< std::string > types
 
std::vector< std::string > names
 
std::vector< std::string > comments