Asn1CharSet Class Reference
Public Member Functions | |
abstract int | GetCharAtIndex (int index) |
abstract int | GetCharIndex (int charValue) |
virtual int | GetNumBitsPerChar (bool aligned) |
abstract bool | validate (String s) |
Protected Member Functions | |
internal | Asn1CharSet (int nchars) |
Protected Attributes | |
internal int | mABitsPerChar |
internal int | mUBitsPerChar |
Properties | |
abstract int | MaxValue [get] |
Detailed Description
This is the base class for representing character sets that are defined in ASN.1 permitted alphabet constraints.
Constructor & Destructor Documentation
internal Asn1CharSet | ( | int | nchars | ) | [protected] |
This constructor sets the number of bits-per-character values based on the given number of characters in the character set.
- Parameters:
-
nchars Number of characters in the character set
Member Function Documentation
abstract int GetCharAtIndex | ( | int | index | ) | [pure virtual] |
This method will fetch the character from the permitted alphabet at the given index.
- Parameters:
-
index Index of character within the character set
- Returns:
- Character at given index
- Exceptions:
-
Asn1ConsVioException Index not within define range
Implemented in Asn1CharRange, and Asn1DiscreteCharSet.
abstract int GetCharIndex | ( | int | charValue | ) | [pure virtual] |
This method will determine the index of the given character within the permitted alphabet character set.
- Parameters:
-
charValue Character value to search for
- Returns:
- Index of character
- Exceptions:
-
Asn1ConsVioException Character not found in set
Implemented in Asn1CharRange, and Asn1DiscreteCharSet.
virtual int GetNumBitsPerChar | ( | bool | aligned | ) | [virtual] |
This method will return the number of bits-per-character.
- Parameters:
-
aligned Boolean value indicating whether number of aligned (true) or unaligned (false) characters should be returned.
- Returns:
- Number of bits-per-character
abstract bool validate | ( | String | s | ) | [pure virtual] |
This method will validate a character string by comparing its contents to the character set. If a character string contains characters that are not in the character set, this method will return false. Otherwise it returns true.
- Parameters:
-
s The string to be validated.
- Returns:
- False if the string contains invalid characters; true otherwise.
Implemented in Asn1CharRange, and Asn1DiscreteCharSet.
Member Data Documentation
internal int mABitsPerChar [protected] |
This variable holds number of bits-per-character (PER aligned).
internal int mUBitsPerChar [protected] |
This variable holds number of bits-per-character (PER unaligned).
Property Documentation
abstract int MaxValue [get] |
Gets the maximum value of the character within the given permitted alphabet character set.
Value:
Upper Bound Character or Character with max int value
Reimplemented in Asn1CharRange, and Asn1DiscreteCharSet.