An element to print out in the final formatted message.  
 More...
#include <MessageFormatter.h>
|  | 
| ElementType | type | 
|  | The type of element to print. 
 | 
|  | 
| std::string | format | 
|  | The format for printing out the element.  More... 
 | 
|  | 
| int | limit | 
|  | The number of characters to limit string types before passing to the formatter.  More... 
 | 
|  | 
An element to print out in the final formatted message. 
◆ Element() [1/2]
  
  | 
        
          | olp::logging::MessageFormatter::Element::Element | ( | ElementType | type_ | ) |  |  | explicit | 
 
Creates an Element instance with the element type. 
The format string is set automatically based on the type.
- Parameters
- 
  
  
 
 
◆ Element() [2/2]
  
  | 
        
          | olp::logging::MessageFormatter::Element::Element | ( | ElementType | type_, |  
          |  |  | std::string | format_, |  
          |  |  | int | limit_ = 0 |  
          |  | ) |  |  |  | inline | 
 
Creates an Element instance with all of the members. 
- Parameters
- 
  
    | type_ | The element type. |  | format_ | The format string. It is a literal when type_isElementType::String. |  | limit_ | The number of characters to limit string types before passing to the formatter. A negative number cuts off from the beginning of the string. A positive number cuts off from the end of the string. A value of zero leaves the input string untouched. |  
 
 
 
◆ operator!=()
  
  | 
        
          | bool olp::logging::MessageFormatter::Element::operator!= | ( | const Element & | other | ) | const |  | inline | 
 
Checks whether the values of two Element instances are not the same. 
- Parameters
- 
  
  
- Returns
- True if the values are not the same; false otherwise. 
 
 
◆ operator==()
  
  | 
        
          | bool olp::logging::MessageFormatter::Element::operator== | ( | const Element & | other | ) | const |  | inline | 
 
Checks whether the values of two Element instances are the same. 
- Parameters
- 
  
  
- Returns
- True if the values are the same; false otherwise. 
 
 
◆ format
      
        
          | std::string olp::logging::MessageFormatter::Element::format | 
      
 
The format for printing out the element. 
It is used as a literal for ElementType::String without passing through printf. 
 
 
◆ limit
      
        
          | int olp::logging::MessageFormatter::Element::limit | 
      
 
The number of characters to limit string types before passing to the formatter. 
A negative number cuts off from the beginning of a string. A positive number cuts off from the end of the string. A value of zero leaves the input string untouched. 
 
 
The documentation for this struct was generated from the following file: