# NV::Rules::IFrontend Class Reference
[NvRules Tool lifetime-managed classes.]

Frontend interface. More...

## Public Member Functions
virtual bool | focus_metric (int message_id, const char *metric_name, double metric_value, Severity severity, const char *info)=0
| Rule focus metric message.
virtual void | load_chart_from_file (const char *filename)=0
virtual int | message (MsgType type, const char *str, const char *name=nullptr)=0
| Rule result message.
virtual int | message (const char *str, const char *name=nullptr)=0
| Rule result message.

## Detailed Description

The frontend is responsible for relaying messages and results to the caller via user interfaces, logs or output files.

## Member Function Documentation

virtual bool NV::Rules::IFrontend::focus_metric | ( | int | message_id,
|  | const char * | metric_name,
|  | double | metric_value,
|  | Severity | severity,
|  | const char * | info |
| ) |  |  | `[pure virtual]`

Issues a focus metric message to the frontend, e.g. to indicate a key metric that triggered the rule output. Can be associated with a prior message using its `message_id` . The `severity` can be used to indicate this metric's impact/severity on the result. The `info` field can be set to a descriptive string for further information, e.g. the calculation leading to this metric being focused.

virtual void NV::Rules::IFrontend::load_chart_from_file | ( | const char * | filename | ) | `[pure virtual]`

Load a ProfilerSection google protcol buffer chart from `filename`

virtual int NV::Rules::IFrontend::message | ( | MsgType | type,
|  | const char * | str,
|  | const char * | name = `nullptr` |
| ) |  |  | `[pure virtual]`

Issues a message `str` with a specific message `type` and optional name `name` to the frontend. Returns a message ID that is unique in this rule invocation.

virtual int NV::Rules::IFrontend::message | ( | const char * | str,
|  | const char * | name = `nullptr` |
| ) |  |  | `[pure virtual]`

Issues a message `str` to the frontend with the default MsgType and optional name `name` . Returns a message ID that is unique in this rule invocation.