Audacity 3.2.0
AnonymizedMessage.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file AnonymizedMessage.h
6 @brief Declare a class to store anonymized messages.
7
8 Dmitry Vedenko
9 **********************************************************************/
10
11#include <string>
12#include <wx/string.h>
13
14#pragma once
15
16namespace audacity
17{
18namespace sentry
19{
21
25class SENTRY_REPORTING_API AnonymizedMessage final
26{
27public:
29 AnonymizedMessage() = default;
30
33
36
38 AnonymizedMessage(std::string message);
40 AnonymizedMessage(const std::wstring& message);
42 AnonymizedMessage(const wxString& message);
44 AnonymizedMessage(const char* message);
46 AnonymizedMessage(const wchar_t* message);
47
49 bool Empty() const noexcept;
51 size_t Length() const noexcept;
52
54 const std::string& GetString() const noexcept;
56 wxString ToWXString() const noexcept;
57
58 // Imitate std::string interface
60 const char* c_str() const noexcept;
62 size_t length() const noexcept;
63private:
64 void CleanupPaths();
65
66 std::string mMessage;
67};
68
69} // namespace sentry
70} // namespace audacity
A class, that stores anonymized message.
AnonymizedMessage()=default
Creates an empty message.
AnonymizedMessage(AnonymizedMessage &&)=default
AnonymizedMessage & operator=(const AnonymizedMessage &)=default
AnonymizedMessage(const AnonymizedMessage &)=default
AnonymizedMessage & operator=(AnonymizedMessage &&)=default
constexpr bool Empty(const Tuple &tuple)
Definition: Tuple.h:41
wxString ToWXString(const std::string &str)
STL namespace.