michael@0: /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nscore.h" michael@0: #include "nsISupports.h" michael@0: #include "nsCategoryImp.h" michael@0: #include "nsUnicodeProperties.h" michael@0: michael@0: NS_IMPL_QUERY_INTERFACE(nsCategoryImp, nsIUGenCategory) michael@0: michael@0: NS_IMETHODIMP_(MozExternalRefCountType) nsCategoryImp::AddRef(void) michael@0: { michael@0: return MozExternalRefCountType(1); michael@0: } michael@0: michael@0: NS_IMETHODIMP_(MozExternalRefCountType) nsCategoryImp::Release(void) michael@0: { michael@0: return MozExternalRefCountType(1); michael@0: } michael@0: michael@0: nsCategoryImp* nsCategoryImp::GetInstance() michael@0: { michael@0: static nsCategoryImp categoryImp; michael@0: return &categoryImp; michael@0: } michael@0: michael@0: nsIUGenCategory::nsUGenCategory nsCategoryImp::Get(uint32_t aChar) michael@0: { michael@0: return mozilla::unicode::GetGenCategory(aChar); michael@0: }