/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * a "leaf-node", managed by the nsCategoryNode hashtable. * * we need to keep a "persistent value" (which will be written to the registry) * and a non-persistent value (for the current runtime): these are usually * the same, except when aPersist==false. The strings are permanently arena- * allocated, and will never go away.
*/ class CategoryLeaf : public nsDepCharHashKey { public: explicit CategoryLeaf(constchar* aKey)
: nsDepCharHashKey(aKey), value(nullptr) {} constchar* value;
};
/** * CategoryNode keeps a hashtable of its entries. * the CategoryNode itself is permanently allocated in * the arena.
*/ class CategoryNode { public:
nsresult GetLeaf(const nsACString& aEntryName, nsACString& aResult);
// CategoryNode is arena-allocated, with the strings static CategoryNode* Create(CategoryAllocator* aArena);
~CategoryNode(); voidoperatordelete(void*) {}
/** * The main implementation of nsICategoryManager. * * This implementation is thread-safe.
*/ class nsCategoryManager final : public nsICategoryManager, public nsIMemoryReporter { public:
NS_DECL_ISUPPORTS
NS_DECL_NSICATEGORYMANAGER
NS_DECL_NSIMEMORYREPORTER
/** * Suppress or unsuppress notifications of category changes to the * observer service. This is to be used by nsComponentManagerImpl * on startup while reading the stored category list.
*/
nsresult SuppressNotifications(bool aSuppress);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.