Alpha API to ASN.1 Choice objects

Alpha API implements the following API methods to the rfc1155.Choice and rfc1902.Choice objects.

apiAlphaGetCurrentComponent()

Returns a reference to currently chosen component at Choice object. Raises an exception if no component is currently chosen.

apiAlphaGetTerminalValue()

Acts similarily to apiAlphaGetCurrentComponent() method but works recursively (depth-first) through possibly enclosed Choice objects. Stops on the first non-Choice component encountered.

apiAlphaSetTerminalValue(value)

Walks recursively (depth-first) over Choice components in attempt to assign a value (which must be any of rfc1155 or rfc1157 objects) as a Choice component. Stops on first successful assignment.


ilya@glas.net