1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 07:12:34 +02:00
2021-06-08 08:08:26 -07:00

56 lines
1.3 KiB
C++

/*!********************************************************************
Audacity: A Digital Audio Editor
@file AnonymizedMessage.h
@brief Declare a class to store anonymized messages.
Dmitry Vedenko
**********************************************************************/
#include <string>
#include <wx/string.h>
#pragma once
namespace audacity
{
namespace sentry
{
class SENTRY_REPORTING_API AnonymizedMessage final
{
public:
AnonymizedMessage() = default;
AnonymizedMessage(const AnonymizedMessage&) = default;
AnonymizedMessage(AnonymizedMessage&&) = default;
AnonymizedMessage& operator=(const AnonymizedMessage&) = default;
AnonymizedMessage& operator=(AnonymizedMessage&&) = default;
AnonymizedMessage(std::string message);
AnonymizedMessage(const std::wstring& message);
AnonymizedMessage(const wxString& message);
AnonymizedMessage(const char* message);
AnonymizedMessage(const wchar_t* message);
bool Empty() const noexcept;
size_t Length() const noexcept;
const std::string& GetString() const noexcept;
wxString ToWXString() const noexcept;
// Immitate std::string interface
const char* c_str() const noexcept;
size_t length() const noexcept;
private:
void CleanupPaths();
std::string mMessage;
};
} // namespace sentry
} // namespace audacity