//
// Mapping from Unicode to an encoding.
//
-// Copyright 2001-2002 Glyph & Cog, LLC
+// Copyright 2001-2003 Glyph & Cog, LLC
//
//========================================================================
#ifndef UNICODEMAP_H
#define UNICODEMAP_H
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#include "gtypes.h"
#include "CharTypes.h"
+#if MULTITHREADED
+#include "GMutex.h"
+#endif
+
class GString;
//------------------------------------------------------------------------
static UnicodeMap *parse(GString *encodingNameA);
// Create a resident UnicodeMap.
- UnicodeMap(char *encodingNameA,
+ UnicodeMap(char *encodingNameA, GBool unicodeOutA,
UnicodeMapRange *rangesA, int lenA);
// Create a resident UnicodeMap that uses a function instead of a
// list of ranges.
- UnicodeMap(char *encodingNameA, UnicodeMapFunc funcA);
+ UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+ UnicodeMapFunc funcA);
~UnicodeMap();
GString *getEncodingName() { return encodingName; }
+ GBool isUnicode() { return unicodeOut; }
+
// Return true if this UnicodeMap matches the specified
// <encodingNameA>.
GBool match(GString *encodingNameA);
GString *encodingName;
UnicodeMapKind kind;
+ GBool unicodeOut;
union {
UnicodeMapRange *ranges; // (user, resident)
UnicodeMapFunc func; // (func)
UnicodeMapExt *eMaps; // (user)
int eMapsLen; // (user)
int refCnt;
+#if MULTITHREADED
+ GMutex mutex;
+#endif
};
//------------------------------------------------------------------------