1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- #include <string>
- #include "../common/FileReaderFwd.h"
- OPENMPT_NAMESPACE_BEGIN
- class SongMessage : public std::string
- {
- public:
-
- enum LineEnding
- {
- leCR,
- leLF,
- leCRLF,
- leMixed,
- leAutodetect,
- };
- enum
- {
- InternalLineEnding = '\r',
- };
-
-
-
-
-
- bool Read(const std::byte *data, const size_t length, LineEnding lineEnding);
- bool Read(FileReader &file, const size_t length, LineEnding lineEnding);
-
-
-
-
-
-
- bool ReadFixedLineLength(const std::byte *data, const size_t length, const size_t lineLength, const size_t lineEndingLength);
- bool ReadFixedLineLength(FileReader &file, const size_t length, const size_t lineLength, const size_t lineEndingLength);
-
-
-
- std::string GetFormatted(const LineEnding lineEnding) const;
-
-
-
- bool SetFormatted(std::string message, LineEnding lineEnding);
-
- void SetRaw(std::string message) noexcept { assign(std::move(message)); }
- };
- OPENMPT_NAMESPACE_END
|