Audacity 3.2.0
JournalOutput.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file JournalOutput.h
6 @brief The output stream of the journal system
7
8 Paul Licameli
9
10**********************************************************************/
11
12#ifndef __AUDACITY_JOURNAL_OUTPUT__
13#define __AUDACITY_JOURNAL_OUTPUT__
14
15#include <initializer_list>
16
17class wxArrayString;
18class wxString;
19
20namespace Journal
21{
22 constexpr auto SeparatorCharacter = ',';
23 constexpr auto EscapeCharacter = '\\';
24 constexpr auto CommentCharacter = '#';
25
26 //\brief Whether actually recording.
27 // IsRecording() && IsReplaying() is possible
28 bool IsRecording();
29
30 //\brief open the output stream, return success code
31 bool OpenOut( const wxString &fullPath );
32
33 //\brief write the strings to the output journal, if recording
34 // None of them may contain newlines
35 void Output( const wxString &string );
36 void Output( const wxArrayString &strings );
37 void Output( std::initializer_list< const wxString > strings );
38
39 //\brief if recording, emit a comment in the output journal that will have
40 // no effect on playback
41 void Comment( const wxString &string );
42}
43
44#endif
Facilities for recording and playback of sequences of user interaction.
bool OpenOut(const wxString &fullPath)
constexpr auto EscapeCharacter
Definition: JournalOutput.h:23
bool IsRecording()
constexpr auto SeparatorCharacter
Definition: JournalOutput.h:22
void Comment(const wxString &string)
void Output(const wxString &string)
constexpr auto CommentCharacter
Definition: JournalOutput.h:24