Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
csv2julia.cc File Reference
#include "csv2julia.hh"

Go to the source code of this file.

Functions

template<>
void convertHeader< JULIA > (std::ostream &out, const Header &header)
 
template<>
void convertCSV< JULIA > (std::ostream &out, const CSV &csv)
 

Function Documentation

◆ convertHeader< JULIA >()

template<>
void convertHeader< JULIA > ( std::ostream & out,
const Header & header )

Definition at line 4 of file csv2julia.cc.

4 {
5 out << "\"\"\"\n";
6 out << "# " << header.description << "\n";
7 out << header.url << "\n";
8 out << "\"\"\"\n";
9 out << "\n";
10 std::string BASE = header.base;
11 for (auto& c : BASE) {
12 c = toupper(c);
13 }
14 out << "module " << BASE << "\n";
15}
std::string description
Definition csv2code.hh:10
std::string base
Definition csv2code.hh:9
std::string url
Definition csv2code.hh:11

◆ convertCSV< JULIA >()

template<>
void convertCSV< JULIA > ( std::ostream & out,
const CSV & csv )

Definition at line 18 of file csv2julia.cc.

18 {
19 for (auto i = 0; i < csv.types.size(); i++) {
20 out << " const " << csv.names[i] << " = " << csv.numbers[i] << "\n";
21 }
22 out << "end\n";
23}
std::vector< std::string > numbers
Definition csv2code.hh:18
std::vector< std::string > types
Definition csv2code.hh:16
std::vector< std::string > names
Definition csv2code.hh:17