1*0e209d39SAndroid Build Coastguard Worker // © 2016 and later: Unicode, Inc. and others. 2*0e209d39SAndroid Build Coastguard Worker // License & terms of use: http://www.unicode.org/copyright.html 3*0e209d39SAndroid Build Coastguard Worker /* 4*0e209d39SAndroid Build Coastguard Worker ******************************************************************************* 5*0e209d39SAndroid Build Coastguard Worker * 6*0e209d39SAndroid Build Coastguard Worker * Copyright (C) 2004-2007, International Business Machines 7*0e209d39SAndroid Build Coastguard Worker * Corporation and others. All Rights Reserved. 8*0e209d39SAndroid Build Coastguard Worker * 9*0e209d39SAndroid Build Coastguard Worker ******************************************************************************* 10*0e209d39SAndroid Build Coastguard Worker * file name: uset_imp.h 11*0e209d39SAndroid Build Coastguard Worker * encoding: UTF-8 12*0e209d39SAndroid Build Coastguard Worker * tab size: 8 (not used) 13*0e209d39SAndroid Build Coastguard Worker * indentation:4 14*0e209d39SAndroid Build Coastguard Worker * 15*0e209d39SAndroid Build Coastguard Worker * created on: 2004sep07 16*0e209d39SAndroid Build Coastguard Worker * created by: Markus W. Scherer 17*0e209d39SAndroid Build Coastguard Worker * 18*0e209d39SAndroid Build Coastguard Worker * Internal USet definitions. 19*0e209d39SAndroid Build Coastguard Worker */ 20*0e209d39SAndroid Build Coastguard Worker 21*0e209d39SAndroid Build Coastguard Worker #ifndef __USET_IMP_H__ 22*0e209d39SAndroid Build Coastguard Worker #define __USET_IMP_H__ 23*0e209d39SAndroid Build Coastguard Worker 24*0e209d39SAndroid Build Coastguard Worker #include "unicode/utypes.h" 25*0e209d39SAndroid Build Coastguard Worker #include "unicode/uset.h" 26*0e209d39SAndroid Build Coastguard Worker 27*0e209d39SAndroid Build Coastguard Worker U_CDECL_BEGIN 28*0e209d39SAndroid Build Coastguard Worker 29*0e209d39SAndroid Build Coastguard Worker typedef void U_CALLCONV 30*0e209d39SAndroid Build Coastguard Worker USetAdd(USet *set, UChar32 c); 31*0e209d39SAndroid Build Coastguard Worker 32*0e209d39SAndroid Build Coastguard Worker typedef void U_CALLCONV 33*0e209d39SAndroid Build Coastguard Worker USetAddRange(USet *set, UChar32 start, UChar32 end); 34*0e209d39SAndroid Build Coastguard Worker 35*0e209d39SAndroid Build Coastguard Worker typedef void U_CALLCONV 36*0e209d39SAndroid Build Coastguard Worker USetAddString(USet *set, const UChar *str, int32_t length); 37*0e209d39SAndroid Build Coastguard Worker 38*0e209d39SAndroid Build Coastguard Worker typedef void U_CALLCONV 39*0e209d39SAndroid Build Coastguard Worker USetRemove(USet *set, UChar32 c); 40*0e209d39SAndroid Build Coastguard Worker 41*0e209d39SAndroid Build Coastguard Worker typedef void U_CALLCONV 42*0e209d39SAndroid Build Coastguard Worker USetRemoveRange(USet *set, UChar32 start, UChar32 end); 43*0e209d39SAndroid Build Coastguard Worker 44*0e209d39SAndroid Build Coastguard Worker /** 45*0e209d39SAndroid Build Coastguard Worker * Interface for adding items to a USet, to keep low-level code from 46*0e209d39SAndroid Build Coastguard Worker * statically depending on the USet implementation. 47*0e209d39SAndroid Build Coastguard Worker * Calls will look like sa->add(sa->set, c); 48*0e209d39SAndroid Build Coastguard Worker */ 49*0e209d39SAndroid Build Coastguard Worker struct USetAdder { 50*0e209d39SAndroid Build Coastguard Worker USet *set; 51*0e209d39SAndroid Build Coastguard Worker USetAdd *add; 52*0e209d39SAndroid Build Coastguard Worker USetAddRange *addRange; 53*0e209d39SAndroid Build Coastguard Worker USetAddString *addString; 54*0e209d39SAndroid Build Coastguard Worker USetRemove *remove; 55*0e209d39SAndroid Build Coastguard Worker USetRemoveRange *removeRange; 56*0e209d39SAndroid Build Coastguard Worker }; 57*0e209d39SAndroid Build Coastguard Worker typedef struct USetAdder USetAdder; 58*0e209d39SAndroid Build Coastguard Worker 59*0e209d39SAndroid Build Coastguard Worker U_CDECL_END 60*0e209d39SAndroid Build Coastguard Worker 61*0e209d39SAndroid Build Coastguard Worker #ifdef __cplusplus 62*0e209d39SAndroid Build Coastguard Worker 63*0e209d39SAndroid Build Coastguard Worker namespace { 64*0e209d39SAndroid Build Coastguard Worker 65*0e209d39SAndroid Build Coastguard Worker constexpr int32_t USET_CASE_MASK = USET_CASE_INSENSITIVE | USET_ADD_CASE_MAPPINGS; 66*0e209d39SAndroid Build Coastguard Worker 67*0e209d39SAndroid Build Coastguard Worker } // namespace 68*0e209d39SAndroid Build Coastguard Worker 69*0e209d39SAndroid Build Coastguard Worker #endif // __cplusplus 70*0e209d39SAndroid Build Coastguard Worker 71*0e209d39SAndroid Build Coastguard Worker #endif 72