1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/lwbrk/src/nsSampleWordBreaker.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef nsSampleWordBreaker_h__ 1.9 +#define nsSampleWordBreaker_h__ 1.10 + 1.11 + 1.12 +#include "nsIWordBreaker.h" 1.13 + 1.14 +typedef enum { 1.15 + kWbClassSpace = 0, 1.16 + kWbClassAlphaLetter, 1.17 + kWbClassPunct, 1.18 + kWbClassHanLetter, 1.19 + kWbClassKatakanaLetter, 1.20 + kWbClassHiraganaLetter, 1.21 + kWbClassHWKatakanaLetter, 1.22 + kWbClassThaiLetter 1.23 +} wb_class; 1.24 + 1.25 +class nsSampleWordBreaker : public nsIWordBreaker 1.26 +{ 1.27 + NS_DECL_ISUPPORTS 1.28 +public: 1.29 + 1.30 + nsSampleWordBreaker() ; 1.31 + virtual ~nsSampleWordBreaker() ; 1.32 + 1.33 + bool BreakInBetween(const char16_t* aText1 , uint32_t aTextLen1, 1.34 + const char16_t* aText2 , uint32_t aTextLen2); 1.35 + nsWordRange FindWord(const char16_t* aText1 , uint32_t aTextLen1, 1.36 + uint32_t aOffset); 1.37 + 1.38 + int32_t NextWord(const char16_t* aText, uint32_t aLen, uint32_t aPos); 1.39 + 1.40 +protected: 1.41 + uint8_t GetClass(char16_t aChar); 1.42 +}; 1.43 + 1.44 +#endif /* nsSampleWordBreaker_h__ */