xlld.wrap.traits

This module implements the compile-time reflection machinery to automatically register all D functions that are eligible in a compile-time define list of modules to be called from Excel.

Import this module from any module from your XLL build and:

import xlld;

mixin(implGetWorksheetFunctionsString!("module1", "module2", "module3"));

All eligible functions in the 3 example modules above will automagically be accessible from Excel (assuming the built XLL is loaded as an add-in).

Members

Aliases

Identity
alias Identity(alias T) = T
Undocumented in source.

Enums

Async
enum Async

UDA for functions to be executed asynchronously

Functions

dllDefFile
DllDefFile dllDefFile(string libName, string description, Flag!"onlyExports" onlyExports)

Returns a structure descripting a Windows .def file. This allows the tests to not care about the specific formatting used when writing the information out. This encapsulates all the functions to be exported by the DLL/XLL.

generateDllDef
void generateDllDef(string[] args)
getAllWorksheetFunctions
WorksheetFunction[] getAllWorksheetFunctions(Flag!"onlyExports" onlyExports)

Gets all Excel-callable functions from the given modules

getModuleWorksheetFunctions
WorksheetFunction[] getModuleWorksheetFunctions(Flag!"onlyExports" onlyExports)

Gets all Excel-callable functions in a given module

getTypeText
wstring getTypeText()
Undocumented in source. Be warned that the author may not have intended to support it.
getWorksheetFunction
WorksheetFunction getWorksheetFunction()

Take a D function as a compile-time parameter and returns a WorksheetFunction struct with the fields filled in accordingly.

getWorksheetFunctions
auto getWorksheetFunctions()
Undocumented in source. Be warned that the author may not have intended to support it.
implGetWorksheetFunctionsString
string implGetWorksheetFunctionsString()

Implements the getWorksheetFunctions function needed by xlld.sdk.xll in order to register the Excel-callable functions at runtime This used to be a template mixin but even using a string mixin inside fails to actually make it an extern(C) function.

implGetWorksheetFunctionsString
string implGetWorksheetFunctionsString(string[] modules)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixin templates

GenerateDllDef
mixintemplate GenerateDllDef(string module_ = __MODULE__)

Structs

DllDefFile
struct DllDefFile
Statement
struct Statement

Templates

isCallableFunction
template isCallableFunction(alias F)
Undocumented in source.
isOneOf
template isOneOf(T, A...)
Undocumented in source.
isSupportedFunction
template isSupportedFunction(alias F, alias functionTypePredicate)

Is true if F is a callable function and functionTypePredicate is true for the return type and all parameter types of F.

isWorksheetFunction
template isWorksheetFunction(alias F)
Undocumented in source.
isWorksheetFunctionModuloLinkage
template isWorksheetFunctionModuloLinkage(alias F)

if the types match for a worksheet function but without checking the linkage

Meta