UNPKG

openfl

Version:

A fast, productive library for 2D cross-platform development.

79 lines (62 loc) 2.19 kB
// Class: openfl.utils.QName var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this $global.Object.defineProperty(exports, "__esModule", {value: true}); var __map_reserved = {}; // Imports var $hxClasses = require("./../../hxClasses_stub").default; var $hxEnums = require("./../../hxEnums_stub").default; var $import = require("./../../import_stub").default; function js_Boot() {return require("./../../js/Boot");} function Std() {return require("./../../Std");} function openfl_utils_Namespace() {return require("./../../openfl/utils/Namespace");} // Constructor var QName = function(namespace,name) { if(namespace == null && name == null) { this.__uri = ""; this.__localName = ""; } else if(namespace != null && name == null) { if(((namespace) instanceof QName)) { var other = (js_Boot().default).__cast(namespace , QName); this.__uri = other.get_uri(); this.__localName = other.get_localName(); } else { this.__uri = ""; this.__localName = (Std().default).string(namespace); } } else { if(((namespace) instanceof (openfl_utils_Namespace().default))) { this.__uri = ((js_Boot().default).__cast(namespace , (openfl_utils_Namespace().default))).get_uri(); } else if(namespace != null) { this.__uri = (Std().default).string(namespace); } else { this.__uri = null; } if(((name) instanceof QName)) { this.__localName = ((js_Boot().default).__cast(name , QName)).get_localName(); } else { this.__localName = (Std().default).string(name); } } } // Meta QName.__name__ = "openfl.utils.QName"; QName.__isInterface__ = false; QName.prototype = { get_uri: function() { return this.__uri; }, get_localName: function() { return this.__localName; } }; QName.prototype.__class__ = QName.prototype.constructor = $hxClasses["openfl.utils.QName"] = QName; // Init { var tmp = QName.prototype; var tmp1 = { get : function () { return this.get_uri (); }}; var tmp2 = function () { return this.get_localName (); } global.Object.defineProperties(tmp,{ uri : tmp1, localName : { get : tmp2}}); }; // Statics // Export exports.default = QName;