2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsISupports.h"
|
|
|
|
#include "nsCategoryImp.h"
|
2012-02-24 02:15:46 -08:00
|
|
|
#include "nsUnicodeProperties.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-04-27 00:06:00 -07:00
|
|
|
NS_IMPL_QUERY_INTERFACE(nsCategoryImp, nsIUGenCategory)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-03-27 13:38:33 -07:00
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType) nsCategoryImp::AddRef(void)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2014-03-27 13:38:33 -07:00
|
|
|
return MozExternalRefCountType(1);
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2014-03-27 13:38:33 -07:00
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType) nsCategoryImp::Release(void)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2014-03-27 13:38:33 -07:00
|
|
|
return MozExternalRefCountType(1);
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2007-08-28 19:03:31 -07:00
|
|
|
nsCategoryImp* nsCategoryImp::GetInstance()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2013-08-16 12:05:51 -07:00
|
|
|
static nsCategoryImp categoryImp;
|
|
|
|
return &categoryImp;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
nsIUGenCategory::nsUGenCategory nsCategoryImp::Get(uint32_t aChar)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2012-02-24 02:15:46 -08:00
|
|
|
return mozilla::unicode::GetGenCategory(aChar);
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|