SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TEncoding_CP437 Class Reference

#include <unicode.h>

Static Public Member Functions

static TStr GetName ()
 
static int ToUnicode (int c)
 
static int FromUnicode (int c)
 

Static Public Attributes

static const int toUnicodeTable [8 *16]
 
static const int fromUnicodeTable1 [6 *16]
 
static const int fromUnicodeTable2 [4 *16]
 
static const int fromUnicodeTable3 [6 *16]
 
static const int fromUnicodeTable4 [11 *16]
 

Detailed Description

Definition at line 506 of file unicode.h.

Member Function Documentation

static int TEncoding_CP437::FromUnicode ( int  c)
inlinestatic

Definition at line 513 of file unicode.h.

513  {
514  if (0 <= c && c < 0x80) return c;
515  else if (0xa0 <= c && c < 0x100) return fromUnicodeTable1[c - 0xa0];
516  else if (0x390 <= c && c < 0x3d0) return fromUnicodeTable2[c - 0x390];
517  else if (0x2210 <= c && c < 0x2270) return fromUnicodeTable3[c - 0x2210];
518  else if (0x2500 <= c && c < 0x25b0) return fromUnicodeTable4[c - 0x2500];
519  else if (c == 0x192) return 0x9f;
520  else if (c == 0x207f) return 0xfc;
521  else if (c == 0x20a7) return 0x9e;
522  else if (c == 0x2310) return 0xa9;
523  else if (c == 0x2320) return 0xf4;
524  else if (c == 0x2321) return 0xf5;
525  else return -1; }
static const int fromUnicodeTable1[6 *16]
Definition: unicode.h:510
static const int fromUnicodeTable2[4 *16]
Definition: unicode.h:510
static const int fromUnicodeTable3[6 *16]
Definition: unicode.h:510
static const int fromUnicodeTable4[11 *16]
Definition: unicode.h:510
static TStr TEncoding_CP437::GetName ( )
inlinestatic

Definition at line 509 of file unicode.h.

509 { return "CP437"; }
static int TEncoding_CP437::ToUnicode ( int  c)
inlinestatic

Definition at line 511 of file unicode.h.

511  { Assert(0 <= c && c <= 255);
512  if (c < 0x80) return c; else return toUnicodeTable[c - 0x80]; }
#define Assert(Cond)
Definition: bd.h:251
static const int toUnicodeTable[8 *16]
Definition: unicode.h:510

Member Data Documentation

const int TEncoding_CP437::fromUnicodeTable1
static
Initial value:
= {
0x00ff, 0x00ad, 0x009b, 0x009c, -1, 0x009d, -1, -1, -1, -1, 0x00a6, 0x00ae, 0x00aa, -1, -1, -1,
0x00f8, 0x00f1, 0x00fd, -1, -1, 0x00e6, -1, 0x00fa, -1, -1, 0x00a7, 0x00af, 0x00ac, 0x00ab, -1, 0x00a8,
-1, -1, -1, -1, 0x008e, 0x008f, 0x0092, 0x0080, -1, 0x0090, -1, -1, -1, -1, -1, -1,
-1, 0x00a5, -1, -1, -1, -1, 0x0099, -1, -1, -1, -1, -1, 0x009a, -1, -1, 0x00e1,
0x0085, 0x00a0, 0x0083, -1, 0x0084, 0x0086, 0x0091, 0x0087, 0x008a, 0x0082, 0x0088, 0x0089, 0x008d, 0x00a1, 0x008c, 0x008b,
-1, 0x00a4, 0x0095, 0x00a2, 0x0093, -1, 0x0094, 0x00f6, -1, 0x0097, 0x00a3, 0x0096, 0x0081, -1, -1, 0x0098,
}

Definition at line 510 of file unicode.h.

const int TEncoding_CP437::fromUnicodeTable2
static
Initial value:
= {
-1, -1, -1, 0x00e2, -1, -1, -1, -1, 0x00e9, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 0x00e4, -1, -1, 0x00e8, -1, -1, 0x00ea, -1, -1, -1, -1, -1, -1,
-1, 0x00e0, -1, -1, 0x00eb, 0x00ee, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0x00e3, -1, -1, 0x00e5, 0x00e7, -1, 0x00ed, -1, -1, -1, -1, -1, -1, -1, -1, -1,
}

Definition at line 510 of file unicode.h.

const int TEncoding_CP437::fromUnicodeTable3
static
Initial value:
= {
-1, -1, -1, -1, -1, -1, -1, -1, -1, 0x00f9, 0x00fb, -1, -1, -1, 0x00ec, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 0x00ef, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ,
-1, -1, -1, -1, -1, -1, -1, -1, 0x00f7, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ,
-1, 0x00f0, -1, -1, 0x00f3, 0x00f2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
}

Definition at line 510 of file unicode.h.

const int TEncoding_CP437::fromUnicodeTable4
static
Initial value:
= {
0x00c4, -1, 0x00b3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x00da, -1, -1, -1,
0x00bf, -1, -1, -1, 0x00c0, -1, -1, -1, 0x00d9, -1, -1, -1, 0x00c3, -1, -1, -1,
-1, -1, -1, -1, 0x00b4, -1, -1, -1, -1, -1, -1, -1, 0x00c2, -1, -1, -1,
-1, -1, -1, -1, 0x00c1, -1, -1, -1, -1, -1, -1, -1, 0x00c5, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ,
0x00cd, 0x00ba, 0x00d5, 0x00d6, 0x00c9, 0x00b8, 0x00b7, 0x00bb, 0x00d4, 0x00d3, 0x00c8, 0x00be, 0x00bd, 0x00bc, 0x00c6, 0x00c7,
0x00cc, 0x00b5, 0x00b6, 0x00b9, 0x00d1, 0x00d2, 0x00cb, 0x00cf, 0x00d0, 0x00ca, 0x00d8, 0x00d7, 0x00ce, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ,
0x00df, -1, -1, -1, 0x00dc, -1, -1, -1, 0x00db, -1, -1, -1, 0x00dd, -1, -1, -1,
0x00de, 0x00b0, 0x00b1, 0x00b2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0x00fe, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
}

Definition at line 510 of file unicode.h.

const int TEncoding_CP437::toUnicodeTable
static
Initial value:
= {
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192,
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229,
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0
}

Definition at line 510 of file unicode.h.


The documentation for this class was generated from the following files: