|
|
 |
 |
|
Asn1Enumerated Class ReferenceInheritance diagram for Asn1Enumerated:
List of all members.
Detailed Description
This class represents the ASN.1 ENUMERATED built-in type. It is declared to be an abstract class and therefore cannot be used on its own. It must be extended by a specific enumerated type class.
|
Public Member Functions |
| | Asn1Enumerated (int value_) |
| | Asn1Enumerated () |
| virtual void | Decode (Asn1PerDecodeBuffer buffer, long lower, long upper) |
| override void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) |
| virtual void | DecodeXER (System.String buffer, System.String attrs) |
| virtual void | DecodeXML (System.String buffer, System.String attrs) |
| virtual void | Encode (Asn1PerOutputStream outs, long lower, long upper) |
| override void | Encode (Asn1BerOutputStream outs, bool explicitTagging) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName, System.String attribute) |
| virtual void | Encode (Asn1XerEncodeBuffer buffer) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
| virtual void | Encode (Asn1PerEncodeBuffer buffer, long lower, long upper) |
| override int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging) |
| override bool | Equals (System.Object value) |
| virtual bool | Equals (int value) |
| override int | GetHashCode () |
| virtual int | ParseValue (System.String value) |
| override System.String | ToString () |
Public Attributes |
| int | mValue |
| const int | UNDEFINED = - 999 |
Static Public Attributes |
| static new readonly Asn1Tag | _TAG |
Constructor & Destructor Documentation
|
|
The default constructor sets the enumerated value to undefined. |
|
|
This constructor creates an enumerated object from a integer value.
- Parameters:
-
|
Member Function Documentation
|
|
This method decodes an ASN.1 enumerated value using the Packed Encoding Rules (PER). The decoded result is stored in the public member 'mValue' in this object.
- Parameters:
-
| buffer | PER Decode message buffer object |
| lower | Smallest enumerated value in the set |
| upper | Largest enumerated value in the set |
|
| override void Decode |
( |
Asn1BerDecodeBuffer |
buffer, |
|
|
bool |
explicitTagging, |
|
|
int |
implicitLength |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 enumerated value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
- Parameters:
-
| buffer | Decode message buffer object |
| explicitTagging | Flag indicating element is explicitly tagged |
| implicitLength | Length of contents if implicit |
Reimplemented from Asn1Type. |
| virtual void DecodeXER |
( |
System.String |
buffer, |
|
|
System.String |
attrs |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 enumerated value using the XML encoding rules (XER).
- Parameters:
-
| buffer | String containing data to be decoded. The value is assumed to be clear text with wrapping element delimiters (i.e. "<" and "/>") removed. |
| attrs | Attributes string from element tag |
|
| virtual void DecodeXML |
( |
System.String |
buffer, |
|
|
System.String |
attrs |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 enumerated value using the XML schema encoding rules(asn2xsd).
- Parameters:
-
| buffer | String containing data to be decoded |
| attrs | Attributes string from element tag |
|
|
|
This method encodes an ASN.1 enumerated value using the Packed Encoding Rules (PER).
Also throws any exception thrown by the underlying Asn1PerOutputStream.
- Parameters:
-
| outs | PER Output Stream object |
| lower | Smallest enumerated value in the set |
| upper | Largest enumerated value in the set |
- Exceptions:
-
|
|
|
This method encodes and writes to the stream an ASN.1 enumerated value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
Throws, Exception thrown by C# System.IO.Stream for I/O error
- Parameters:
-
| outs | BER Output Stream object |
| explicitTagging | Flag indicating explicit tagging should be done |
- Exceptions:
-
Reimplemented from Asn1Type. |
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName, |
|
|
System.String |
attribute |
|
) |
[virtual] |
|
|
|
This method encodes an ASN.1 enumerated value using the XML Encoding as specified in the XML schema standard(asn2xsd).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | Element name |
| attribute | Element attribute value |
Reimplemented from Asn1Type. |
|
|
This method encodes an ASN.1 enumerated value using the XML encoding rules (XER). This method does not add start and end tags (<tag> and </tag>), only value is encoded (<val1/> or <val2/>).
- Parameters:
-
| buffer | Encode message buffer object |
|
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName |
|
) |
[virtual] |
|
|
|
This method encodes an ASN.1 enumerated value using the XML encoding rules (XER).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | Element name |
Reimplemented from Asn1Type. |
|
|
This method encodes an ASN.1 enumerated value using the Packed Encoding Rules (PER).
- Parameters:
-
| buffer | PER Encode message buffer object |
| lower | Smallest enumerated value in the set |
| upper | Largest enumerated value in the set |
|
|
|
This method encodes an ASN.1 enumerated value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
- Parameters:
-
| buffer | Encode message buffer object |
| explicitTagging | Flag indicating explicit tagging should be done |
- Returns:
- Length of component or negative status value
Reimplemented from Asn1Type. |
| override bool Equals |
( |
System.Object |
value |
) |
|
|
|
|
This method compares this enumerated value to the given value for equality.
- Parameters:
-
| value | The Object to compare with the current Object. Object should be instance of Asn1Enumerated. |
- Returns:
true if the specified Object is equal to the current Object; otherwise, false.
|
| virtual bool Equals |
( |
int |
value |
) |
[virtual] |
|
|
|
This method compares this enumerated value to the given value for equality.
- Parameters:
-
| value | The int or enumerated value to compare with the current Object. |
- Returns:
true if the specified int value is equal to the current Object; otherwise, false.
|
| override int GetHashCode |
( |
|
) |
|
|
|
|
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. - Returns:
- A hash code for the current Object.
|
| virtual int ParseValue |
( |
System.String |
value |
) |
[virtual] |
|
|
|
This method will parse the given enumeration text and set the enumerated value. This method is implemented by the extending class for XER or XML code generation ONLY.
- Parameters:
-
- Returns:
- Stringified representation of the value
AB: don't make it abstract (it is only for XER) |
| override System.String ToString |
( |
|
) |
|
|
|
|
This method will return the enumeration text for a given enumerated value.
- Returns:
- Stringified representation of the value
|
Member Data Documentation
|
|
The _TAG constant describes the universal tag for this data type (UNIVERSAL 10).
Reimplemented from Asn1Type. |
|
|
This public member variable is where the enumerated value is stored. This is the value that is encoded when one of the encode methods is called. It is also where the decoded result is stored when a Decode method is called. |
|
|
The UNDEFINED constant is stored in the mValue member variable when the value of this enumerated type is undetermined. |
|
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.
|
This file was last modified on
18 Nov 2005. ASN1C C# Runtime Library, 5.8 |
|