NvRulesAPI: NV::Rules::IContext Class Reference

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

Context interface. More...

Inherits NV::Rules::IBaseContext.

## Public Member Functions
virtual IController * | controller ()=0
| Get the controller object.
virtual IFrontend * | frontend ()=0
| Get the frontend object.
virtual std::string | get_version ()=0
| Get version number of this interface.
virtual bool | handle_exception (const char *msg)=0
| Context exception handler.
virtual size_t | num_ranges ()=0
| Get the number of available ranges.
virtual IRange * | range_by_idx (size_t idx)=0
| Get a single range by index.

## Detailed Description

The rule context provides the rule with access to all collected data, properties and means to relay results back to the caller.

## Member Function Documentation

virtual IController* NV::Rules::IContext::controller | ( |  | ) | `[pure virtual]`

Get the IController object

virtual IFrontend* NV::Rules::IContext::frontend | ( |  | ) | `[pure virtual]`

Get the IFrontend object

virtual std::string NV::Rules::IBaseContext::get_version | ( |  | ) | `[pure virtual, inherited]`

Returns the version number of this interface as a string of the form <year>.<major>.<minor> It matches the Nsight Compute version this interface originates from.

virtual bool NV::Rules::IBaseContext::handle_exception | ( | const char * | msg | ) | `[pure virtual, inherited]`

Should return true if a python exception should be set, false otherwise

virtual size_t NV::Rules::IContext::num_ranges | ( |  | ) | `[pure virtual]`

Get the number of available ranges

virtual IRange* NV::Rules::IContext::range_by_idx | ( | size_t | idx | ) | `[pure virtual]`

Get a single IRange by index