20#ifndef LIBREPCB_CORE_CSVFILE_H
21#define LIBREPCB_CORE_CSVFILE_H
93 void setComment(
const QString& comment)
noexcept;
102 void setHeader(
const QStringList& header)
noexcept;
112 void addValue(
const QStringList& value);
135 QString
lineToString(const QStringList& line) const noexcept;
136 static QString
escapeValue(const QString& value) noexcept;
The CsvFile class represents a comma-separated values (CSV) file.
Definition: csvfile.h:58
void setHeader(const QStringList &header) noexcept
Set the header items.
Definition: csvfile.cpp:54
static QString escapeValue(const QString &value) noexcept
Definition: csvfile.cpp:116
const QStringList & getHeader() const noexcept
Get the CSV header items.
Definition: csvfile.h:79
~CsvFile() noexcept
Definition: csvfile.cpp:43
QString getCommentLines() const noexcept
Definition: csvfile.cpp:84
CsvFile(const CsvFile &other)=delete
QStringList mHeader
Definition: csvfile.h:140
QString toString() const noexcept
Build CSV file content and return it as a string.
Definition: csvfile.cpp:67
CsvFile() noexcept
Definition: csvfile.cpp:40
void addValue(const QStringList &value)
Add a row of values.
Definition: csvfile.cpp:59
const QList< QStringList > & getValues() const noexcept
Get the CSV values.
Definition: csvfile.h:86
QString lineToString(const QStringList &line) const noexcept
Definition: csvfile.cpp:99
QList< QStringList > mValues
Definition: csvfile.h:141
void setComment(const QString &comment) noexcept
Set file comment.
Definition: csvfile.cpp:50
QString mComment
Definition: csvfile.h:139
void saveToFile(const FilePath &csvFp) const
Write CSV file content to a file.
Definition: csvfile.cpp:76
const QString & getComment() const noexcept
Get the comment of the file.
Definition: csvfile.h:72
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
Definition: occmodel.cpp:77