TOC PREV NEXT INDEX


Populating Generated Choice Structures for Encoding



The only way a CHOICE construct can be populated for encoding is by using one the generated set_<element> methods. It is necessary to do it this way because the base class contains two protected member variables (choiceID and element) that must be set consistently. This is the only instance of a mapped type where the mapped element values do not have public access.

The following demonstrates setting a variable of the TestChoice structure defined above to use the first option:

	TestChoice testChoice = new TestChoice ();
 
	testChoice.set_a (new Asn1Integer (222));
 






Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX