SNAP Library 2.1, Developer Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TEncoding_YuAscii Class Reference

#include <unicode.h>

List of all members.

Static Public Member Functions

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

Static Public Attributes

static const int uniChars [10] = { 0x106, 0x107, 0x10c, 0x10d, 0x160, 0x161, 0x17d, 0x17e, 0x110, 0x111 }
static const int yuAsciiChars [10] = { 0x5d, 0x7d, 0x5e, 0x7e, 0x5b, 0x7b, 0x40, 0x60, 0x5c, 0x7c }

Detailed Description

Definition at line 490 of file unicode.h.


Member Function Documentation

static int TEncoding_YuAscii::FromUnicode ( int  c) [inline, static]

Definition at line 499 of file unicode.h.

References uniChars, and yuAsciiChars.

                                      {
                for (int i = 0; i < int(sizeof(uniChars) / sizeof(uniChars[0])); i++)
                        if (c == uniChars[i]) return yuAsciiChars[i];
                        else if(c == yuAsciiChars[i]) return -1;
                if (0 <= c && c <= 255) return c; else return -1; }
static TStr TEncoding_YuAscii::GetName ( ) [inline, static]

Definition at line 494 of file unicode.h.

{ return "YU-ASCII"; }
static int TEncoding_YuAscii::ToUnicode ( int  c) [inline, static]

Definition at line 495 of file unicode.h.

References Assert, uniChars, and yuAsciiChars.

                                    { Assert(0 <= c && c <= 255);
                for (int i = 0; i < int(sizeof(yuAsciiChars) / sizeof(yuAsciiChars[0])); i++)
                        if (c == yuAsciiChars[i]) return uniChars[i];
                return c; }

Member Data Documentation

const int TEncoding_YuAscii::uniChars = { 0x106, 0x107, 0x10c, 0x10d, 0x160, 0x161, 0x17d, 0x17e, 0x110, 0x111 } [static]

Definition at line 493 of file unicode.h.

Referenced by FromUnicode(), and ToUnicode().

const int TEncoding_YuAscii::yuAsciiChars = { 0x5d, 0x7d, 0x5e, 0x7e, 0x5b, 0x7b, 0x40, 0x60, 0x5c, 0x7c } [static]

Definition at line 493 of file unicode.h.

Referenced by FromUnicode(), and ToUnicode().


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