<context1>:
[<ModuleName1>.]<objectName1>[,[<ModuleName2>.]<objectName2>..[,[<ModuleNameN>.]<objectNameN>]
;
<...>
where ModuleNameN is the module name of the MIB specification defining the MIB object with name objectNameN. There must be generated at least one context per selection template which has to contain at least one object name. Specifying a MIB module name for an object name is optional but recommended since it prevents incorrect mappings when a project's MIB modules do not have unique object names.
Using selection templates allows to individually select which objects to be generated in which files. By leaving the selection template column empty, one of the standard code generation options and must be chosen. For most agents using the standard templates is sufficient and provides the best code generation performance. By using one of the standard code generation options, the code generation job starts with step 2 below.
The file name generation template is called. Depending on the job type, the context provided by the generation template is used to generate the file name for the file(s) generated by this job. The output of the template is appended to the job's input and output directory to form the paths for the input and output files respectively.
If an input directory has been specified for the job, then the corresponding input file will be scanned for user code protection tags of the form:
//--AgentGen BEGIN=<class>[::<method>]
<any program code that is protected during a (re)generation>
//--AgentGen END
The program code found between the tags will then be stored in a Hashtable accessible through the context existingCode. The key for the Hashtable entries is built using the form: <class>[::<method>].
Finally, the code generation template is called with the contexts described in the section “Customizing Code Generation” on page 32. The produced output is written to the output file(s) specified by the generated file name(s) and the given output directory. If output and input directory are the same, then the input file(s) will be overwritten by the generated output.