1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 06:29:56 +00:00
openmw/components/misc/messageformatparser.hpp

38 lines
802 B
C++
Raw Normal View History

#ifndef OPENMW_COMPONENTS_MISC_MESSAGEFORMATPARSER_H
#define OPENMW_COMPONENTS_MISC_MESSAGEFORMATPARSER_H
2022-05-21 08:48:32 +00:00
#include <string_view>
namespace Misc
{
class MessageFormatParser
{
2022-09-22 18:26:05 +00:00
protected:
enum Placeholder
{
StringPlaceholder,
IntegerPlaceholder,
FloatPlaceholder
};
2022-09-22 18:26:05 +00:00
enum Notation
{
FixedNotation,
ScientificNotation,
ShortestNotation
};
2022-09-22 18:26:05 +00:00
virtual void visitedPlaceholder(
Placeholder placeholder, char padding, int width, int precision, Notation notation)
= 0;
virtual void visitedCharacter(char c) = 0;
2022-09-22 18:26:05 +00:00
public:
virtual ~MessageFormatParser();
2016-08-21 09:18:41 +00:00
2022-09-22 18:26:05 +00:00
virtual void process(std::string_view message);
};
}
#endif