|
BDE 4.39.x Production Release
|
Provide a typedef for the record formatter functor.
Provide a typedef for the record formatter functor.
This component provides a struct, ball::RecordFormatterFunctor, that contains a single typedef, Type, which is the type of the functor used for formatting log records to a stream.
This section illustrates intended use of this component.
Suppose we want to define a simple function that formats log records. We can use ball::RecordFormatterFunctor::Type to declare a functor that conforms to the expected signature.
First, we include the necessary headers and define a simple formatting function:
Then, we can assign this function to a variable of the functor type:
Finally, we can use this functor to format a record: