Exemple #1
0
	// See E4X 13.2.2, pg 64
    Namespace::Namespace(Atom prefix, Stringp uri, NamespaceType flags)
#ifdef DEBUGGER
		: AvmPlusScriptableObject(sotNamespace())
#endif // DEBUGGER
	{
		// verify our parameters are interned strings
		AvmAssert (uri->isInterned());
		// prefix can be an interned string, undefined, or null
		AvmAssert (AvmCore::isName(prefix) || AvmCore::isNullOrUndefined(prefix));
		setPrefix(prefix);
		setUri(uri, flags);
	}
Exemple #2
0
    // See E4X 13.2.2, pg 64
    Namespace::Namespace(Atom prefix, Stringp uri, NamespaceType flags, ApiVersion apiVersion) :
#ifdef DEBUGGER
        AvmPlusScriptableObject(sotNamespace()),
#endif // DEBUGGER
        m_prefix(prefix),
        m_apiVersion(apiVersion)
    {
        // verify our parameters are interned strings
        AvmAssert(uri->isInterned());
        // prefix can be an interned string, undefined, or null
        AvmAssert(AvmCore::isName(prefix) || AvmCore::isNullOrUndefined(prefix));
        // ensure that if the incoming Atom is a string, that it's interned
        AvmAssert(AvmCore::isString(prefix) ? (AvmCore::atomToString(prefix))->isInterned() : 1);
        setUri(uri, flags);
        // ApiVersion should be ALLVERSIONS for all Namespaces that are nonpublic.
        AvmAssert(flags != NS_Public ? apiVersion == kApiVersion_VM_ALLVERSIONS : true);
    }