MCPcopy Create free account
hub / github.com/culvertsoft/mgen / setParent

Function setParent

mgen-javascriptlib/src/main/javascript/mgen-lib.js:134–150  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

132 /* CREATION HELPER FUNCTIONS */
133
134 function setParent(obj) {
135 var C, super_path;
136 if (ClassRegistryBlueprint.classes.hasOwnProperty(obj)) {
137 C = ClassRegistry.getClass(tmpWrap(ClassRegistryBlueprint.classes[obj].__t));
138 if (C.prototype instanceof ClassRegistry) {
139 return;
140 }
141 super_path = getParentTypePath(ClassRegistryBlueprint.classes[obj]);
142 if (!super_path) {
143 C.prototype = new ClassRegistry();
144 } else {
145 setParent(super_path);
146 C.prototype = new(ClassRegistry.getClass(super_path))("NO_CONSTRUCT");
147 }
148 C.prototype.constructor = C;
149 }
150 }
151
152 function handleConflict(path) {
153 var shortName = getShortName(path),

Callers 1

mgen-lib.jsFile · 0.85

Calls 3

tmpWrapFunction · 0.85
getParentTypePathFunction · 0.85
getClassMethod · 0.80

Tested by

no test coverage detected