16 #ifndef CONVERSION_PATTERN_H 17 #define CONVERSION_PATTERN_H 79 : conv_pattern(std::move(conv_pattern)), ptype(ptype){};
105 std::string conv_pattern;
124 std::string &msg, std::string new_value)
const 129 size_t pos_in_string = 0;
130 while ((pos_in_string = msg.find(this->conv_pattern, pos_in_string)) !=
132 msg.replace(pos_in_string, this->conv_pattern.length(), new_value);
133 pos_in_string += new_value.length();
Definition: conversion_pattern.h:66
ConversionPattern(std::string conv_pattern, const PATTERN_TYPE ptype)
Constructor for the a conversion pattern.
Definition: conversion_pattern.h:78
Definition: conversion_pattern.h:69
Definition: conversion_pattern.h:62
Definition: conversion_pattern.h:61
Global ealogger constants.
Main namespace for ealogger.
Definition: conversion_pattern.h:28
A conversion pattern for message templates.
Definition: conversion_pattern.h:55
PATTERN_TYPE
Identifiers for patterns supported by ealogger.
Definition: conversion_pattern.h:60
Definition: conversion_pattern.h:68
Definition: conversion_pattern.h:67
Definition: conversion_pattern.h:65
Definition: conversion_pattern.h:64
ConversionPattern::PATTERN_TYPE get_pattern_type() const
Get the conversion pattern type.
Definition: conversion_pattern.h:99
Definition: conversion_pattern.h:63
void replace_conversion_pattern(std::string &msg, T new_value) const
Replace conversion pattern with new_value.
Definition: conversion_pattern.h:88