AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::lumberjack::TextEqualityCombiner Class Reference

Combines Message classes if their Message::text are equal. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/lumberjack/TextEqualityCombiner.hpp>

Inheritance diagram for axom::lumberjack::TextEqualityCombiner:

Public Member Functions

 TextEqualityCombiner ()
 
const std::string id ()
 Returns the unique string identifier for this combiner. Used by Lumberjack to differentiate between other combiners. More...
 
bool shouldMessagesBeCombined (const Message &leftMessage, const Message &rightMessage)
 Function used by Lumberjack to indicate whether two messages should be combined. More...
 
void combine (Message &combined, const Message &combinee, const int ranksLimit)
 Combines the combinee into the combined Message. More...
 

Detailed Description

Combines Message classes if their Message::text are equal.

This class instance is automatically added to Lumberjack's Lumberjack for you. If you want it removed call Lumberjack::removeCombiner with the string "TextEqualityCombiner" as it's parameter.

Warning
Using the TextEqualityCombiner with Message::tag has undefined behavior.
See also
Combiner Lumberjack

Constructor & Destructor Documentation

◆ TextEqualityCombiner()

axom::lumberjack::TextEqualityCombiner::TextEqualityCombiner ( )
inline

Member Function Documentation

◆ id()

const std::string axom::lumberjack::TextEqualityCombiner::id ( )
inlinevirtual

Returns the unique string identifier for this combiner. Used by Lumberjack to differentiate between other combiners.

Implements axom::lumberjack::Combiner.

◆ shouldMessagesBeCombined()

bool axom::lumberjack::TextEqualityCombiner::shouldMessagesBeCombined ( const Message leftMessage,
const Message rightMessage 
)
inlinevirtual

Function used by Lumberjack to indicate whether two messages should be combined.

They are not actually combined by this function. Message classes are triggered for combination if both Message::text are equal.

Parameters
[in]leftMessageOne of the Messages to be compared.
[in]rightMessageOne of the Messages to be compared.

Implements axom::lumberjack::Combiner.

References axom::lumberjack::Message::text().

◆ combine()

void axom::lumberjack::TextEqualityCombiner::combine ( Message combined,
const Message combinee,
const int  ranksLimit 
)
inlinevirtual

Combines the combinee into the combined Message.

The only thing truly combined in this Combiner is the ranks from combinee to combined, since text is already equal.

Parameters
[in,out]combinedthe Message that will be modified.
[in]combineethe Message that is combined into the other.
[in]ranksLimitThe limit on how many individual ranks are tracked in the combined Message. Message::rankCount is always incremented.
Precondition
shouldMessagesBeCombined(combined, combinee) must be true

Implements axom::lumberjack::Combiner.

References axom::lumberjack::Message::addRanks(), axom::lumberjack::Message::count(), and axom::lumberjack::Message::ranks().


The documentation for this class was generated from the following file: