1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +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 10:48:32 +02:00
#include <string_view>
namespace Misc
{
class MessageFormatParser
{
2022-09-22 21:26:05 +03:00
protected:
enum Placeholder
{
StringPlaceholder,
IntegerPlaceholder,
FloatPlaceholder
};
2022-09-22 21:26:05 +03:00
enum Notation
{
FixedNotation,
ScientificNotation,
ShortestNotation
};
2022-09-22 21:26:05 +03:00
virtual void visitedPlaceholder(
Placeholder placeholder, char padding, int width, int precision, Notation notation)
= 0;
virtual void visitedCharacter(char c) = 0;
2022-09-22 21:26:05 +03:00
public:
virtual ~MessageFormatParser();
2016-08-21 18:18:41 +09:00
2022-09-22 21:26:05 +03:00
virtual void process(std::string_view message);
};
}
#endif