
Method and Constructor Generation
Each generated C# class will have two constructors. The first constructor will be the default constructor. This will initialize each member variable value to null. The second constructor will accept values for all the data members.
ATTRIBUTE ::= CLASS { &Type, &id OBJECT IDENTIFIER UNIQUE } WITH SYNTAX { WITH SYNTAX &Type ID &id }public class ATTRIBUTE { public Asn1Type Type; public Asn1ObjectIdentifier id; public ATTRIBUTE() { Type = null; id = null; } public ATTRIBUTE( Asn1Type Type_, Asn1ObjectIdentifier id_ ) { Type = Type_; id = id_; } }
Additional C# classes are generated to create types for fields within the class definitions as follows:
_<ClassName>_<FieldName> ::= <Type>Here ClassName is replaced with name of the Class Assignment and FieldName is replaced with name of the field. Type is the type definition in the ASN.1 CLASS's TypeField.
This type is used as a defined type in the information object definition for absent values of the TypeField. It is also useful for the user to generate a value for a related OpenType definition in a table constraint.
2. New type assignments are created for ValueField or ValueSetField type definitions if the type is with a constraint definition and/or the type is Sequence / Set / Choice / Sequenceof / SetOf definition.
_<ClassName>_<FieldName> ::= <Type>Here ClassName is replaced with name of the Class Assignment and FieldName is replaced with name of the ValueField or ValueSetField. Type is the type definition in The ASN.1 CLASS's ValueField or ValueSetField. This type will appear as a defined type in the ASN.1 CLASS's ValueField or ValueSetField.
This new type assignment is used for compiler internal code generation purpose. It is not designed for use by the end user.
_<ClassName>_<FieldName>_default <Type> ::= <Value>Here ClassName is replaced with name of the Class Assignment and FieldName is replaced with name of the ValueField. Value is the default value in the ASN.1 CLASS's ValueField and Type is the type in the ASN.1 CLASS's ValueField.
Objective Systems, Inc.102 Pickering Way, Suite #506Exton, 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 |