
Generated Stream-Oriented C++ Decode Method Format and Calling Parameters
Generated C stream-oriented decode functions are invoked through the C++ class interface by calling the generated DecodeFrom method. The calling sequence for this method is as follows:
status = <object>.DecodeFrom (<inputStream>);In this definition, <object> is an instance of the control class (i.e., ASN1C_<prodName>) generated for the given production.
The <inputStream> placeholder represents an input stream object type. This is an object derived from an ASN1DecodeStream class.
The function result variable stat returns the completion status. Error status codes are negative. Return status values are defined in the rtxErrCodes.h include file.
<inputStream> >> <object>;Exceptions are not used in ASN1C C++, therefore, the user must fetch the status value following a call such as this in order to determine if it was successful. The getStatus method in the ASN1DecodeStream class is used for this purpose.
Also, the method Decode without parameters is supported for backward compatibility. In this case it is necessary to create a control class object (i.e., ASN1C_<prodName>) using an input stream reference as the first parameter and a reference to a variable of the generated type as the second parameter of the constructor.
Objective Systems, Inc.55 Dowlin Forge RoadExton, 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 |