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:53
static QString escapeValue(const QString &value) noexcept
Definition csvfile.cpp:115
const QStringList & getHeader() const noexcept
Get the CSV header items.
Definition csvfile.h:79
~CsvFile() noexcept
Definition csvfile.cpp:42
QString getCommentLines() const noexcept
Definition csvfile.cpp:83
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:66
CsvFile() noexcept
Definition csvfile.cpp:39
void addValue(const QStringList &value)
Add a row of values.
Definition csvfile.cpp:58
const QList< QStringList > & getValues() const noexcept
Get the CSV values.
Definition csvfile.h:86
QString lineToString(const QStringList &line) const noexcept
Definition csvfile.cpp:98
QList< QStringList > mValues
Definition csvfile.h:141
void setComment(const QString &comment) noexcept
Set file comment.
Definition csvfile.cpp:49
QString mComment
Definition csvfile.h:139
void saveToFile(const FilePath &csvFp) const
Write CSV file content to a file.
Definition csvfile.cpp:75
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:127
Definition occmodel.cpp:76