intl/unicharutil/src/nsCategoryImp.cpp
author Wes Kocher <wkocher@mozilla.com>
Wed, 29 Jan 2014 15:30:42 -0800
changeset 176108 095aa30cb6ef6a6772808db30e4ec3685a2d7d76
parent 164855 d6357352d724525b94b14aa1dd4519248d7769ae
child 195375 ad7d8b0efb321de10f2ac7191e32ff6e278c84f9
permissions -rw-r--r--
Backed out changeset 82bc631a9e53 (bug 950240) a=backout CLOSED TREE

/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#include "nscore.h"
#include "nsISupports.h"
#include "nsCategoryImp.h"
#include "nsUnicodeProperties.h"

NS_IMPL_QUERY_INTERFACE1(nsCategoryImp, nsIUGenCategory)

NS_IMETHODIMP_(nsrefcnt) nsCategoryImp::AddRef(void)
{
  return nsrefcnt(1);
}

NS_IMETHODIMP_(nsrefcnt) nsCategoryImp::Release(void)
{
  return nsrefcnt(1);
}

nsCategoryImp* nsCategoryImp::GetInstance()
{
  static nsCategoryImp categoryImp;
  return &categoryImp;
}

nsIUGenCategory::nsUGenCategory nsCategoryImp::Get(uint32_t aChar)
{
  return mozilla::unicode::GetGenCategory(aChar);
}