private void FormAddVertexShaderField_Load(object sender, EventArgs e) { { FieldQualifier[] qualifiers = new FieldQualifier[] { FieldQualifier.In, FieldQualifier.Out, FieldQualifier.Uniform, }; this.cmbQualifier.Items.Clear(); foreach (var item in qualifiers) { this.cmbQualifier.Items.Add(item); } this.cmbQualifier.SelectedIndex = 0; } { this.cmbType.Items.Clear(); foreach (var item in this.template.GetAllIntermediateStructures()) { this.cmbType.Items.Add(item); } this.cmbType.SelectedIndex = 0; } }
public SearchQuery() { Fields = new FieldQualifier(); ValueMap = new ValueFieldQualifier(); PredicateMap = new PredicateFieldQualifier(); OperationMap = new OperationFieldQualifier(); }
/// <summary> /// Protected initialization /// </summary> public FieldInfo(TypeContext typeContext, Int32 index, String name, TypeResolver typeResolver, FieldQualifier qualifier, Object defaultValue) { _typeContext = typeContext; _index = index; _name = name; _qualifier = qualifier; _typeResolver = typeResolver; _defaultValue = defaultValue; }
private void FormAddVertexShaderField_Load(object sender, EventArgs e) { this.txtName.Text = this.clonedTarget.FieldName; { FieldQualifier[] qualifiers = new FieldQualifier[] { FieldQualifier.In, FieldQualifier.Out, FieldQualifier.Uniform, }; this.cmbQualifier.Items.Clear(); foreach (var item in qualifiers) { this.cmbQualifier.Items.Add(item); } for (int i = 0; i < this.cmbQualifier.Items.Count; i++) { if (this.cmbQualifier.Items[i].ToString() == this.clonedTarget.Qualider.ToString()) { this.cmbQualifier.SelectedIndex = i; break; } } } { this.cmbType.Items.Clear(); foreach (var item in this.template.GetAllIntermediateStructures()) { this.cmbType.Items.Add(item); } for (int i = 0; i < this.cmbType.Items.Count; i++) { if (this.cmbType.Items[i].ToString() == this.clonedTarget.FieldType) { this.cmbType.SelectedIndex = i; break; } } } this.txtValue.Text = this.clonedTarget.FieldValue; }
public static Type GetAttributeType(this FieldQualifier qualifier) { Type type = null; switch (qualifier) { case FieldQualifier.In: type = typeof(InAttribute); break; case FieldQualifier.Out: type = typeof(OutAttribute); break; case FieldQualifier.Uniform: type = typeof(UniformAttribute); break; default: throw new NotImplementedException(); } return type; }
public static string GetString(this FieldQualifier qualifier) { string result = string.Empty; switch (qualifier) { case FieldQualifier.In: result = "in"; break; case FieldQualifier.Out: result = "out"; break; case FieldQualifier.Uniform: result = "uniform"; break; default: throw new NotImplementedException(); } return result; }
public SemanticField(FieldQualifier varQualifier, Type type, string varName) { this.varQualifier = varQualifier; this.varType = type; this.varName = varName; }
protected void AddFieldInternal(Int32 index, String name, TypeResolver typeResolver, FieldQualifier qualifier, Object defaultValue) { if (_fieldsByName.ContainsKey(name)) throw new DuplicateFieldNameException("Duplicate field {0} found for record {1}", name, FullName); if (_fieldsByIndex.ContainsKey(index)) throw new DuplicateFieldIndexException("Duplicate field index {0} found for record {1}", index, FullName); var fieldInfo = new FieldInfo(_typeContext, index, name, typeResolver, qualifier, defaultValue); _fields.Add(fieldInfo); _fieldsByName[fieldInfo.Name] = fieldInfo; _fieldsByIndex[fieldInfo.Index] = fieldInfo; }
public ModelQuery() { Fields = new FieldQualifier(); ValueMap = new ValueFieldQualifier(); PredicateMap = new PredicateFieldQualifier(); }
public RecordTypeBuilder AddField(Int32 index, String name, String typeName, FieldQualifier qualifier, Object defaultValue) { AddFieldInternal(index, name, new TypeResolver(typeName), qualifier, defaultValue); return this; }
public FieldQuery() { Fields = new FieldQualifier(); }