Plato on Github
Report Home
src/define/interface/constructor.js
Maintainability
81.21
Lines of code
44
Difficulty
6.75
Estimated Errors
0.07
Function weight
By Complexity
By SLOC
/** * @file Interface constructor * @since 0.1.8 */ /*#ifndef(UMD)*/ "use strict"; /*global _gpfErrorDeclare*/ // Declare new gpf.Error names /*global _gpfFunctionBuild*/ // Build function from description and context /*exported _gpfDefineGetInterfaceConstructor*/ // Allocate an interface constructor /*#endif*/ _gpfErrorDeclare("define/interface/constructor", { "interfaceConstructorFunction": "This is an interface constructor function, do not invoke" }); function _gpfDefineGetInterfaceConstructorDefinition (interfaceDefinition) { var name = interfaceDefinition._name; return { name: name, body: "gpf.Error.interfaceConstructorFunction();" }; } function _gpfDefineGetInterfaceConstructorContext (interfaceDefinition) { return { gpf: gpf, _classDef_: interfaceDefinition }; } /** * Allocate a secured named constructor * * @param {_GpfInterfaceDefinition} interfaceDefinition Interface definition * @return {Function} Secured named constructor * @gpf:closure * @since 0.1.8 */ function _gpfDefineGetInterfaceConstructor (interfaceDefinition) { return _gpfFunctionBuild(_gpfDefineGetInterfaceConstructorDefinition(interfaceDefinition), _gpfDefineGetInterfaceConstructorContext(interfaceDefinition)); }