scuffed-code/tools/unicode/c/genprops/genprops.h
Markus Scherer f712c8bc00 ICU-8972 merge gencase into genprops
X-SVN-Rev: 31189
2012-01-10 07:23:44 +00:00

57 lines
1.8 KiB
C++

/*
*******************************************************************************
*
* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: genprops.h
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created on: 1999dec13
* created by: Markus W. Scherer
*/
#ifndef __GENPROPS_H__
#define __GENPROPS_H__
#include <stdio.h>
#include "unicode/utypes.h"
#include "unicode/uniset.h"
#include "ppucd.h"
#include "unewdata.h"
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
class PropsBuilder {
public:
PropsBuilder();
virtual ~PropsBuilder();
virtual void setUnicodeVersion(const UVersionInfo version);
virtual void setAlgNamesRange(UChar32 start, UChar32 end,
const char *type, const char *prefix, UErrorCode &errorCode);
virtual void setProps(const icu::UniProps &props, const icu::UnicodeSet &newValues, UErrorCode &errorCode);
virtual void build(UErrorCode &errorCode);
virtual void writeCSourceFile(const char *path, UErrorCode &errorCode);
virtual void writeBinaryData(const char *path, UBool withCopyright, UErrorCode &errorCode);
};
class PNamesBuilder : public PropsBuilder {
public:
virtual const PropertyNames *getPropertyNames() = 0;
};
PNamesBuilder *createPNamesBuilder(UErrorCode &errorCode);
PropsBuilder *createCorePropsBuilder(UErrorCode &errorCode);
PropsBuilder *createBiDiPropsBuilder(UErrorCode &errorCode);
PropsBuilder *createCasePropsBuilder(UErrorCode &errorCode);
PropsBuilder *createNamesPropsBuilder(UErrorCode &errorCode);
/* global flags */
extern UBool beVerbose;
extern UBool beQuiet;
#endif