registerObjectConstructor(typeKey, func, override = false) {
	        const typeIndex = this.typeKey2Index(typeKey);
	        if (this.objFactory.has(typeIndex)) {
	            if (!override) {
	                throw new Error("Type " + typeKey + " already registered");
	            }
	        }
	        this.objFactory.set(typeIndex, func);
	    }
Register an object constructor.
@param typeKey The name of the function.
@param func function to be registered.
@param override Whether overwrite function in existing registry.