XLL+ Class Library (7.0)

CXllFunctionFilterEventHandlerFromFile Class

An automatically registered event observer for XlRegisterFunctions, which loads and applies a function filter configuration file.

class CXllFunctionFilterEventHandlerFromFile : public CXlRegisterFunctionsEventStaticObserver


This event observer should be declared at global scope as a static instance, as below:

CXllFunctionFilterEventHandlerFromFile theFunctionFilter(CXllFunctionFilterLoader::EXPLICIT);

During the XlRegisterFunctions event, the object's Update method will be called. As a result, the specified configuration file will be located, loaded and parsed and then applied to the function filter registry, CXllFunctionFilter. The actual work of loading and parsing the file is performed by CXllFunctionFilterLoader.

Configuration file

The configuration file will be parsed in one of two ways.

If the loadType specified in the constructor is CXllFunctionFilterLoader::OPT_IN or CXllFunctionFilterLoader::OPT_OUT then the file should contain a list of function names, each on a single line. Blank lines are ignored.

If the loadType is CXllFunctionFilterLoader::EXPLICIT then the file should contain a list of function names and actions, each on a single line. Each line should contain a pair of items, separated by white space: first a function name, and second a boolean value, which can be 1, 0, true or false. If the boolean value is 1 or true, then the function in that line is published. If the boolean value is 0 or false, then the function in that line is suppressed. Blank lines are ignored.


Header: xlpfunctionfilter.h

See Also

CXllFunctionFilterEventHandlerFromFile Methods | xlpfunctionfilter.h | CXllFunctionFilter class | CXllFunctionFilterLoader class | CXlRegisterFunctionsEvent | Publishing and suppressing add-in functions (User Guide)