C++ API Reference
MCacheConfigRuleRegistry Class Reference

Class for configuring the caching rules. More...

#include <MCacheConfigRuleRegistry.h>

Static Public Member Functions

static MStatus registerFilter (const MString &filterName, MCreateCacheConfigRuleFilterFunction creatorFunction)
 Registers a new filter that can be later used in rules to configure caching through the cacheEvaluator command. More...
 
static MStatus unregisterFilter (const MString &filterName)
 Unregisters a filter from the cache configuration. More...
 
static const char * className ()
 Returns the name of this class. More...
 
static void setRegisteringCallableScript ()
 Mark the current registration operation as one that will be passed callbacks defined in script.
 
static bool registeringCallableScript ()
 Return true if the current registration operation has its callbacks defined in script.
 

Detailed Description

Class for configuring the caching rules.

When partitioning the evaluation graph, the Evaluation Manager uses a set of caching rules in order to determine what gets cached.

These rules are made of a pair of one filter and one action. The following pseudocode highlights the role of cache configuration rules, at scheduling time:

for each node for each rule if filter(node) is True Then call action(node) endif

Once registered, filters can be used to create new rules through the cacheEvaluator command

Member Function Documentation

MStatus registerFilter ( const MString filterName,
MCreateCacheConfigRuleFilterFunction  creatorFunction 
)
static

Registers a new filter that can be later used in rules to configure caching through the cacheEvaluator command.

Parameters
[in]filterNamethe name of the filter to register. Must be unique.
[in]creatorFunctiona pointer to a function that will return a pointer to a new instance of the class (derived from MPxCacheConfigRuleFilter ) that implements the new filter.
Returns
  • MStatus::kSuccess the filter has been successfully registered
  • MStatus::kFailure an error prevented the filter from being registered. A filter with the same name might already be registered
Examples:
nameFilter/NameFilter.cpp.
MStatus unregisterFilter ( const MString filterName)
static

Unregisters a filter from the cache configuration.

Parameters
[in]filterNamethe name of the filter to unregister.

Note: unregistering a filter will clear the current cache configuration and disable caching

Returns
  • MStatus::kSuccess the filter has been successfully unregistered
  • MStatus::kFailure an error prevented the filter from being unregistered. A filter with that name might not be registered
Examples:
nameFilter/NameFilter.cpp.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

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