bool linkNamespaces(const char *parent, const char *child) { Namespace *pns = lookupNamespace(parent); Namespace *cns = lookupNamespace(child); if(pns && cns) return cns->classLinkTo(pns); return false; }
int32_t txNamespaceMap::lookupNamespaceWithDefault(const nsAString& aPrefix) { RefPtr<nsAtom> prefix = NS_Atomize(aPrefix); if (prefix != nsGkAtoms::_poundDefault) { return lookupNamespace(prefix); } return lookupNamespace(nullptr); }
int32_t txNamespaceMap::lookupNamespaceWithDefault(const nsAString& aPrefix) { nsCOMPtr<nsIAtom> prefix = do_GetAtom(aPrefix); if (prefix != nsGkAtoms::_poundDefault) { return lookupNamespace(prefix); } return lookupNamespace(nullptr); }
bool unlinkNamespaces(const char *parent, const char *child) { Namespace *pns = lookupNamespace(parent); Namespace *cns = lookupNamespace(child); if(pns == cns) { Con::warnf("Con::unlinkNamespaces - trying to unlink '%s' from itself, aborting.", parent); return false; } if(pns && cns) return cns->unlinkClass(pns); return false; }
void markCommandGroup(const char * nsName, const char *name, const char* usage) { Namespace *ns = lookupNamespace(nsName); ns->markGroup(name,usage); }
void noteScriptCallback( const char *className, const char *funcName, const char *usage, ConsoleFunctionHeader* header ) { Namespace *ns = lookupNamespace(className); ns->addScriptCallback( StringTable->insert(funcName), usage, header ); }
void addCommand( const char *nsName, const char *name,BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool isToolOnly, ConsoleFunctionHeader* header ) { Namespace *ns = lookupNamespace(nsName); ns->addCommand( StringTable->insert(name), cb, usage, minArgs, maxArgs, isToolOnly, header ); }