Exemple #1
0
 /// <summary>
 /// Writes a reference to the given node template.
 /// </summary>
 /// <param name="State"></param>
 /// <param name="Value"></param>
 public void WriteReference(WriterState State, NodeTemplate Value)
 {
     WriteULeb128((uint)State.GetIndex(Value));
 }
Exemple #2
0
 /// <summary>
 /// Writes the given template definition to the output stream,
 /// prefixed by its template type.
 /// </summary>
 /// <param name="Template"></param>
 public void WriteTemplateDefinition(NodeTemplate Template)
 {
     WriteTemplateType(Template.TemplateType);
     Template.Write(this);
 }
Exemple #3
0
 /// <summary>
 /// Gets a template's index in the template table.
 /// The given value is added to the table
 /// if it's not already in there.
 /// </summary>
 /// <param name="Template"></param>
 /// <returns></returns>
 public int GetIndex(NodeTemplate Template)
 {
     return(GetOrAddIndex(Template, templateTable, templates));
 }