/* 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/. */
namespace mozilla::intl { /** * Wrapper around non-portable, ICU4C specific functions.
*/ class ICU4CLibrary final { public:
ICU4CLibrary() = delete;
/** * Initializes the ICU4C library. * * Note: This function should only be called once.
*/ static ICUResult Initialize();
/** * Releases any memory held by ICU. Any open ICU objects and resources are * left in an undefined state after this operation. * * NOTE: This function is not thread-safe.
*/ staticvoid Cleanup();
struct MemoryFunctions { // These are equivalent to ICU's |UMemAllocFn|, |UMemReallocFn|, and // |UMemFreeFn| types. The first argument (called |context| in the ICU // docs) will always be nullptr and should be ignored. using AllocFn = void* (*)(constvoid*, size_t); using ReallocFn = void* (*)(constvoid*, void*, size_t); using FreeFn = void (*)(constvoid*, void*);
/** * Function called when allocating memory.
*/
AllocFn mAllocFn = nullptr;
/** * Function called when reallocating memory.
*/
ReallocFn mReallocFn = nullptr;
/** * Function called when freeing memory.
*/
FreeFn mFreeFn = nullptr;
};
/** * Sets the ICU memory functions. * * This function can only be called before the initial call to Initialize()!
*/ static ICUResult SetMemoryFunctions(MemoryFunctions aMemoryFunctions);
/** * Return the ICU version number.
*/ static Span<constchar> GetVersion();
};
} // namespace mozilla::intl
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
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 und die Messung sind noch experimentell.