CSVExporter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <fstream>
4 #include <unordered_map>
5 #include <vector>
6 #include <string>
7 
9 
11 {
12 protected:
13  std::ofstream ofile;
14 
15  std::vector<std::string> scalVarNames;
16  std::vector<std::string> vectVarNames;
17 
18  void printHeader();
19  void init(const VarDict &vars);
20 
22 
23 public:
24  explicit CSVExporter(const std::string& output);
25 
26  void addScalarVar(const std::string &name);
27  void addVectorVar(const std::string &name);
28 
29  void setPrecision(int precision);
30  void exportVars(const VarDict &vars);
31 };
32 
static QCString name
Definition: declinfo.cpp:673
void printHeader()
Definition: CSVExporter.cxx:55
bool initialized
Definition: CSVExporter.h:21
std::ofstream ofile
Definition: CSVExporter.h:13
float precision
Definition: makePolycone.py:48
void exportVars(const VarDict &vars)
std::string string
Definition: nybbler.cc:12
std::vector< std::string > scalVarNames
Definition: CSVExporter.h:15
Definition: VarDict.h:8
void addScalarVar(const std::string &name)
Definition: CSVExporter.cxx:91
void setPrecision(int precision)
Definition: CSVExporter.cxx:50
void init(const VarDict &vars)
Definition: CSVExporter.cxx:72
void addVectorVar(const std::string &name)
Definition: CSVExporter.cxx:98
std::vector< std::string > vectVarNames
Definition: CSVExporter.h:16
CSVExporter(const std::string &output)
Definition: CSVExporter.cxx:40