By-Name vs. By-Ident Access
Two methods are provided to refer to parameters and enumerated parameter values:
- The by-ident method
- The by-name method
The by-ident method uses an identifier defined in the header file McParams.h.
The by-name method employs a character string corresponding to a defined syntax.
Advantages and disadvantages of using by-ident method or by-name method
Referencing items with the by-ident method |
Referencing items with the by-name method |
Static method All item identifiers are prepared off line by Euresys and made known to the user application source code by means of a special header file. |
Dynamic method The reference to an item can be dynamically established at runtime. For example, a dialog box can invite the user to type an item name. |
Syntax checking The compiler can check the consistency of the identifier spelling. |
No syntax checking The compiler has no way to control the correctness of a quoted character string. |
Faster The MultiCam driver directly accesses the required parameter when the access function is executed. This can be valuable when a lot of parameters have to be consecutively updated under application control. |
Slower The MultiCam driver has to interpret the string when the parameter access function is executed. This involves a search in a list of names, and consumes time at runtime. |