Rhino C++ API  7.21
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_Big5UnicodePair Class Reference

#include <opennurbs_array.h>

Public Member Functions

 ON_Big5UnicodePair ()=default
 
 ON_Big5UnicodePair (const ON_Big5UnicodePair &)=default
 
 ~ON_Big5UnicodePair ()=default
 
const ON_Big5CodePoint Big5 () const
 
unsigned int Big5CodePoint () const
 
bool IsASCII (bool bNullIsASCII) const
 Determing if the values stored as the BIG5 and Unicode code points are equal nonzero ASCII code points. ASCII code point are in the range 0-0x7F (127 decimal). Unicode extends ASCII. Strictly speaking, BIG5 does not extend ASCII, but it is common to mix single bytes ASCII and double byte BIG5 encodings in the same char string. BIG5 is a double byte string encoding with the first byte in the range 0x81 to 0xFE, the minimum BIG5 code point is 0x8140 and the maximum BIG5 code point is 0xFEFE. Thus it is possible to mix ASCII and BIG5 encodings in the same char string. More...
 
bool IsNull () const
 Determine if both code points in this pair are 0. More...
 
bool IsPrivateUse () const
 
bool IsStandard (bool bNullIsValid, bool bASCIICodePointIsStandard) const
 
bool IsValid (bool bNullIsValid, bool bASCIICodePointIsValid) const
 Determine if the pair of code points is valid. If the values for BIG5 and Unicode code point values are &lt 0xFF and equal, the pair is considered valid. Use IsASCII() if you need to treat nonzero ASCII code points differently. More...
 
ON_Big5UnicodePairoperator= (const ON_Big5UnicodePair &)=default
 
const ON_UnicodeShortCodePoint Unicode () const
 
unsigned int UnicodeCodePoint () const
 

Static Public Member Functions

static const ON_SimpleArray< ON_Big5UnicodePair > & Big5ToUnicode ()
 An array sorted by BIG5 code points and useful for converting BIG5 code points to Unicode code points. More...
 
static int CompareBig5AndUnicodeCodePoints (const ON_Big5UnicodePair *lhs, const ON_Big5UnicodePair *rhs)
 Dictionary compare (BIG5 code point first, Unicode code point second). More...
 
static int CompareBig5CodePoint (const ON_Big5UnicodePair *lhs, const ON_Big5UnicodePair *rhs)
 Compares the BIG5 code point. More...
 
static int CompareUnicodeAndBig5CodePoints (const ON_Big5UnicodePair *lhs, const ON_Big5UnicodePair *rhs)
 Dictionary compare (Unicode code point first, BIG5 code point second). More...
 
static int CompareUnicodeCodePoint (const ON_Big5UnicodePair *lhs, const ON_Big5UnicodePair *rhs)
 Compares the Unicode code point. More...
 
static const ON_Big5UnicodePair Create (ON_Big5CodePoint big5_code_point, ON_UnicodeShortCodePoint unicode_code_point)
 Create a BIG5 - Unicode code point pair. More...
 
static const ON_Big5UnicodePair Create (unsigned int big5_code_point, unsigned int unicode_code_point)
 
static const ON_SimpleArray< ON_Big5UnicodePair > & UnicodeToBig5 ()
 An array sorted by Unicode code points and useful for converting Unicode code points to BIG5 code points. More...
 

Static Public Attributes

static const ON_Big5UnicodePair Error
 ON_Big5UnicodePair::Error.Big5() = ON_Big5CodePoint::Error and ON_Big5UnicodePair::Error.Unicode() = ON_UnicodeShortCodePoint::Error. More...
 
static const ON_Big5UnicodePair Null
 

Detailed Description

definitions of the template functions are in a different file so that Microsoft's developer studio's autocomplete utility will work on the template functions.

Constructor & Destructor Documentation

◆ ON_Big5UnicodePair() [1/2]

ON_Big5UnicodePair::ON_Big5UnicodePair ( )
default

◆ ~ON_Big5UnicodePair()

ON_Big5UnicodePair::~ON_Big5UnicodePair ( )
default

◆ ON_Big5UnicodePair() [2/2]

ON_Big5UnicodePair::ON_Big5UnicodePair ( const ON_Big5UnicodePair )
default

Member Function Documentation

◆ Big5()

const ON_Big5CodePoint ON_Big5UnicodePair::Big5 ( ) const

◆ Big5CodePoint()

unsigned int ON_Big5UnicodePair::Big5CodePoint ( ) const

◆ Big5ToUnicode()

static const ON_SimpleArray< ON_Big5UnicodePair >& ON_Big5UnicodePair::Big5ToUnicode ( )
static

An array sorted by BIG5 code points and useful for converting BIG5 code points to Unicode code points.

Returns
Returns an array sorted by ON_Big5UnicodePair::CompareBig5AndUnicodeCodePoints()

◆ CompareBig5AndUnicodeCodePoints()

static int ON_Big5UnicodePair::CompareBig5AndUnicodeCodePoints ( const ON_Big5UnicodePair lhs,
const ON_Big5UnicodePair rhs 
)
static

Dictionary compare (BIG5 code point first, Unicode code point second).

Parameters
lhs
rhs
Returns

◆ CompareBig5CodePoint()

static int ON_Big5UnicodePair::CompareBig5CodePoint ( const ON_Big5UnicodePair lhs,
const ON_Big5UnicodePair rhs 
)
static

Compares the BIG5 code point.

Parameters
lhs
rhs
Returns

◆ CompareUnicodeAndBig5CodePoints()

static int ON_Big5UnicodePair::CompareUnicodeAndBig5CodePoints ( const ON_Big5UnicodePair lhs,
const ON_Big5UnicodePair rhs 
)
static

Dictionary compare (Unicode code point first, BIG5 code point second).

Parameters
lhs
rhs
Returns

◆ CompareUnicodeCodePoint()

static int ON_Big5UnicodePair::CompareUnicodeCodePoint ( const ON_Big5UnicodePair lhs,
const ON_Big5UnicodePair rhs 
)
static

Compares the Unicode code point.

Parameters
lhs
rhs
Returns

◆ Create() [1/2]

static const ON_Big5UnicodePair ON_Big5UnicodePair::Create ( ON_Big5CodePoint  big5_code_point,
ON_UnicodeShortCodePoint  unicode_code_point 
)
static

Create a BIG5 - Unicode code point pair.

Parameters
big5_code_pointBIG5 code point.
unicode_code_pointUnicode code point.
Returns

◆ Create() [2/2]

static const ON_Big5UnicodePair ON_Big5UnicodePair::Create ( unsigned int  big5_code_point,
unsigned int  unicode_code_point 
)
static

◆ IsASCII()

bool ON_Big5UnicodePair::IsASCII ( bool  bNullIsASCII) const

Determing if the values stored as the BIG5 and Unicode code points are equal nonzero ASCII code points. ASCII code point are in the range 0-0x7F (127 decimal). Unicode extends ASCII. Strictly speaking, BIG5 does not extend ASCII, but it is common to mix single bytes ASCII and double byte BIG5 encodings in the same char string. BIG5 is a double byte string encoding with the first byte in the range 0x81 to 0xFE, the minimum BIG5 code point is 0x8140 and the maximum BIG5 code point is 0xFEFE. Thus it is possible to mix ASCII and BIG5 encodings in the same char string.

Parameters
bNullIsASCIIValue to return if both code points are 0.
Returns
True if both code points are equal and ASCII code points (0 to 0x7F).

◆ IsNull()

bool ON_Big5UnicodePair::IsNull ( ) const

Determine if both code points in this pair are 0.

Returns
True if both code points are 0.

◆ IsPrivateUse()

bool ON_Big5UnicodePair::IsPrivateUse ( ) const

Returns
Returns true if this pair is valid and at least one of the code points is a private use code point.

◆ IsStandard()

bool ON_Big5UnicodePair::IsStandard ( bool  bNullIsValid,
bool  bASCIICodePointIsStandard 
) const

Parameters
bNullIsValidValue to return if this pair is null.
bASCIICodePointIsValidValue to return if this pair is an ASCII code point.
Returns

◆ IsValid()

bool ON_Big5UnicodePair::IsValid ( bool  bNullIsValid,
bool  bASCIICodePointIsValid 
) const

Determine if the pair of code points is valid. If the values for BIG5 and Unicode code point values are &lt 0xFF and equal, the pair is considered valid. Use IsASCII() if you need to treat nonzero ASCII code points differently.

Parameters
bNullIsValidValue to return if this pair is null.
bASCIICodePointIsValidValue to return if this pair is an ASCII code point.
Returns
True if the BIG5 and Unicode code points are both valid or IsASCII() is true.

◆ operator=()

ON_Big5UnicodePair& ON_Big5UnicodePair::operator= ( const ON_Big5UnicodePair )
default

◆ Unicode()

const ON_UnicodeShortCodePoint ON_Big5UnicodePair::Unicode ( ) const

◆ UnicodeCodePoint()

unsigned int ON_Big5UnicodePair::UnicodeCodePoint ( ) const

◆ UnicodeToBig5()

static const ON_SimpleArray< ON_Big5UnicodePair >& ON_Big5UnicodePair::UnicodeToBig5 ( )
static

An array sorted by Unicode code points and useful for converting Unicode code points to BIG5 code points.

Returns
Returns an array sorted by ON_Big5UnicodePair::CompareUnicodeAndBig5CodePoints()

Member Data Documentation

◆ Error

const ON_Big5UnicodePair ON_Big5UnicodePair::Error
static

ON_Big5UnicodePair::Error.Big5() = ON_Big5CodePoint::Error and ON_Big5UnicodePair::Error.Unicode() = ON_UnicodeShortCodePoint::Error.

◆ Null

const ON_Big5UnicodePair ON_Big5UnicodePair::Null
static