22 lines
562 B
C++
22 lines
562 B
C++
#include "recording/recording.h"
|
|
|
|
namespace germanairlinesva
|
|
{
|
|
namespace file
|
|
{
|
|
namespace recording
|
|
{
|
|
void Recording::toFile(std::string fileName) const
|
|
{
|
|
std::ofstream out(BASE_DIRECTORY RECORDING_DIRECTORY + fileName,
|
|
std::fstream::binary);
|
|
char header[] = {'V', 'G', 'A', 'R', '\0', 1};
|
|
out.write(header, 6);
|
|
for (const RecordingEntry &entry : this->entries) {
|
|
entry.toFile(out);
|
|
}
|
|
out.close();
|
|
}
|
|
} // namespace recording
|
|
} // namespace file
|
|
} // namespace germanairlinesva
|