Utility classes for Structured warnings, contains the Trade ID and Type.
More...
#include <ored/portfolio/structuredtradewarning.hpp>
|
| StructuredTradeWarningMessage (const QuantLib::ext::shared_ptr< ore::data::Trade > &trade, const std::string &warningType, const std::string &warningWhat) |
|
| StructuredTradeWarningMessage (const std::string &tradeId, const std::string &tradeType, const std::string &warningType, const std::string &warningWhat) |
|
| StructuredMessage (const Category &category, const Group &group, const std::string &message, const std::map< std::string, std::string > &subFields=std::map< std::string, std::string >()) |
|
| StructuredMessage (const Category &category, const Group &group, const std::string &message, const std::pair< std::string, std::string > &subField=std::pair< std::string, std::string >()) |
|
virtual | ~StructuredMessage () |
|
std::string | msg () const |
| return a std::string for the log file More...
|
|
void | emitLog () const |
| generate Boost log record to pass to corresponding sinks More...
|
|
virtual | ~JSONMessage () |
|
virtual std::string | msg () const =0 |
| return a std::string for the log file More...
|
|
void | log () const |
| generate Boost log record to pass to corresponding sinks More...
|
|
const std::string | json () const |
| create JSON-like output from the data More...
|
|
void | set (const std::string &key, const boost::any &value) |
|
|
enum class | Category { Error
, Warning
, Unknown
} |
|
enum class | Group {
Analytics
, Configuration
, Model
, Curve
,
Trade
, Fixing
, Logging
, ReferenceData
,
Unknown
} |
|
static constexpr const char * | name = "StructuredMessage" |
|
void | addSubFields (const std::map< std::string, std::string > &) |
|
virtual void | emitLog () const =0 |
| generate Boost log record - this method is called by log() More...
|
|
static std::string | jsonify (const boost::any &) |
|
std::map< std::string, boost::any > | data_ |
|
Utility classes for Structured warnings, contains the Trade ID and Type.
Definition at line 34 of file structuredtradewarning.hpp.
◆ StructuredTradeWarningMessage() [1/2]
Definition at line 36 of file structuredtradewarning.hpp.
40 std::map<std::string, std::string>(
41 {{"warningType", warningType}, {"tradeId", trade->id()}, {"tradeType", trade->tradeType()}})) {}
StructuredMessage(const Category &category, const Group &group, const std::string &message, const std::map< std::string, std::string > &subFields=std::map< std::string, std::string >())
◆ StructuredTradeWarningMessage() [2/2]
StructuredTradeWarningMessage |
( |
const std::string & |
tradeId, |
|
|
const std::string & |
tradeType, |
|
|
const std::string & |
warningType, |
|
|
const std::string & |
warningWhat |
|
) |
| |
Definition at line 43 of file structuredtradewarning.hpp.
46 std::map<std::string, std::string>(
47 {{"warningType", warningType}, {"tradeId", tradeId}, {"tradeType", tradeType}})) {}