Audacity  3.0.3
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 
17 class wxArrayString;
18 class wxString;
19 
20 namespace 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
Journal
Facilities for recording and playback of sequences of user interaction.
Journal::OpenOut
bool OpenOut(const wxString &fullPath)
Definition: JournalOutput.cpp:33
Journal::CommentCharacter
constexpr auto CommentCharacter
Definition: JournalOutput.h:24
Journal::SeparatorCharacter
constexpr auto SeparatorCharacter
Definition: JournalOutput.h:22
Journal::Output
void Output(const wxString &string)
Definition: JournalOutput.cpp:45
Journal::IsRecording
bool IsRecording()
Definition: JournalOutput.cpp:28
Journal::Comment
void Comment(const wxString &string)
Definition: JournalOutput.cpp:62
Journal::EscapeCharacter
constexpr auto EscapeCharacter
Definition: JournalOutput.h:23