2016-07-09 01:18:45 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_MISC_MESSAGEFORMATPARSER_H
|
|
|
|
#define OPENMW_COMPONENTS_MISC_MESSAGEFORMATPARSER_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Misc
|
|
|
|
{
|
|
|
|
class MessageFormatParser
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
enum Placeholder
|
|
|
|
{
|
|
|
|
StringPlaceholder,
|
|
|
|
IntegerPlaceholder,
|
|
|
|
FloatPlaceholder
|
|
|
|
};
|
|
|
|
|
2018-08-12 21:45:03 +00:00
|
|
|
enum Notation
|
|
|
|
{
|
|
|
|
FixedNotation,
|
2018-08-13 19:31:11 +00:00
|
|
|
ScientificNotation,
|
|
|
|
ShortestNotation
|
2018-08-12 21:45:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
virtual void visitedPlaceholder(Placeholder placeholder, char padding, int width, int precision, Notation notation) = 0;
|
2016-07-09 01:18:45 +00:00
|
|
|
virtual void visitedCharacter(char c) = 0;
|
|
|
|
|
|
|
|
public:
|
2016-08-21 09:18:41 +00:00
|
|
|
virtual ~MessageFormatParser();
|
|
|
|
|
2016-07-09 01:18:45 +00:00
|
|
|
virtual void process(const std::string& message);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|