mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Restructured rhubarb-exporters
This commit is contained in:
28
src/ExportFormat.cpp
Normal file
28
src/ExportFormat.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "ExportFormat.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
ExportFormatConverter& ExportFormatConverter::get() {
|
||||
static ExportFormatConverter converter;
|
||||
return converter;
|
||||
}
|
||||
|
||||
string ExportFormatConverter::getTypeName() {
|
||||
return "ExportFormat";
|
||||
}
|
||||
|
||||
EnumConverter<ExportFormat>::member_data ExportFormatConverter::getMemberData() {
|
||||
return member_data{
|
||||
{ ExportFormat::TSV, "TSV" },
|
||||
{ ExportFormat::XML, "XML" },
|
||||
{ ExportFormat::JSON, "JSON" }
|
||||
};
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, ExportFormat value) {
|
||||
return ExportFormatConverter::get().write(stream, value);
|
||||
}
|
||||
|
||||
std::istream& operator>>(std::istream& stream, ExportFormat& value) {
|
||||
return ExportFormatConverter::get().read(stream, value);
|
||||
}
|
||||
Reference in New Issue
Block a user