• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // © 2017 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 *
6 *   Copyright (C) 1999-2012, International Business Machines
7 *   Corporation and others.  All Rights Reserved.
8 *
9 *******************************************************************************
10 *   file name:  genprops.h
11 *   encoding:   US-ASCII
12 *   tab size:   8 (not used)
13 *   indentation:4
14 *
15 *   created on: 1999dec13
16 *   created by: Markus W. Scherer
17 */
18 
19 #ifndef __GENPROPS_H__
20 #define __GENPROPS_H__
21 
22 #include <stdio.h>
23 #include "unicode/utypes.h"
24 #include "unicode/uniset.h"
25 #include "ppucd.h"
26 #include "unewdata.h"
27 
28 #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
29 
30 class PropsBuilder {
31 public:
32     PropsBuilder();
33     virtual ~PropsBuilder();
34     virtual void setUnicodeVersion(const UVersionInfo version);
35     virtual void setAlgNamesRange(UChar32 start, UChar32 end,
36                                   const char *type, const char *prefix, UErrorCode &errorCode);
37     virtual void setProps(const icu::UniProps &props, const icu::UnicodeSet &newValues, UErrorCode &errorCode);
38     virtual void parseUnidataFiles(const char *unidataPath, UErrorCode &errorCode);
39     virtual void build(UErrorCode &errorCode);
40     virtual void writeCSourceFile(const char *path, UErrorCode &errorCode);
41     virtual void writeJavaSourceFile(const char *path, UErrorCode &errorCode);
42     virtual void writeBinaryData(const char *path, UBool withCopyright, UErrorCode &errorCode);
43 };
44 
45 class PNamesBuilder : public PropsBuilder {
46 public:
47     virtual const icu::PropertyNames *getPropertyNames() = 0;
48 };
49 
50 PNamesBuilder *createPNamesBuilder(UErrorCode &errorCode);
51 PropsBuilder *createCorePropsBuilder(UErrorCode &errorCode);
52 PropsBuilder *createBiDiPropsBuilder(UErrorCode &errorCode);
53 PropsBuilder *createCasePropsBuilder(UErrorCode &errorCode);
54 PropsBuilder *createLayoutPropsBuilder(UErrorCode &errorCode);
55 PropsBuilder *createEmojiPropsBuilder(UErrorCode &errorCode);
56 PropsBuilder *createNamesPropsBuilder(UErrorCode &errorCode);
57 
58 /* global flags */
59 extern UBool beVerbose;
60 extern UBool beQuiet;
61 
62 #endif
63