Наследование: EmitTypeHLSL, IAggTypeHLSL
        public IAggTypeHLSL EmitType(MidElementDecl element)
        {
            IAggTypeHLSL result;
            if (_elementTypes.TryGetValue(element, out result))
                return result;

            // Actually emit the type, then...
            var name = string.Format("Tup_{0}", element.Name.ToString());
            TupleTypeHLSL tupleType = new TupleTypeHLSL(name);
            _elementTypes[element] = tupleType;

            foreach (var a in element.Attributes)
            {
                if (!a.IsOutput) continue;

                var attrName = MapName(a);

                tupleType.AddField(
                    attrName,
                    EmitType(a.Type));
            }

            return tupleType;
        }
        /*
        private EmitValHLSL GetFieldImpl(
            SimpleValHLSL objVal,
            IArrayTypeHLSL fieldRep,
            string fieldName,
            int fieldIndex,
            Span span)
        {
            return new ArrayValHLSL(
                string.Format("({0}).{1}", objVal, fieldName),
                fieldRep);
        }
        */
        private EmitValHLSL GetFieldImpl(
            SimpleValHLSL objVal,
            TupleTypeHLSL fieldRep,
            string fieldName,
            int fieldIndex,
            Span span)
        {
            List<EmitValHLSL> fieldFieldVals = new List<EmitValHLSL>();
            int fieldFieldCount = fieldRep.GetFieldCount();
            for (int ff = 0; ff < fieldFieldCount; ++ff)
            {
                var fieldFieldVal = GetField(
                    objVal,
                    fieldRep.GetFieldType(ff),
                    fieldName + fieldRep.GetFieldName(ff),
                    -1,
                    span);
                fieldFieldVals.Add(fieldFieldVal);
            }

            return new TupleValHLSL(
                fieldRep,
                fieldFieldVals);
        }
 private ITypeHLSL MakePseudoArrayElemTypeImpl(
     TupleTypeHLSL type,
     EmitValHLSL count )
 {
     int fieldCount = type.GetFieldCount();
     TupleTypeHLSL result = new TupleTypeHLSL(type.Name);
     for (int ff = 0; ff < fieldCount; ++ff)
     {
         result.AddField(
             type.GetFieldName(ff),
             MakePseudoArrayElemType(
                 type.GetFieldType(ff),
                 count));
     }
     return result;
 }
 public EmitValHLSL GetElemImpl(
     TupleValHLSL obj,
     EmitValHLSL idx)
 {
     int fieldCount = obj.GetFieldCount();
     EmitValHLSL[] fieldVals = new EmitValHLSL[fieldCount];
     TupleTypeHLSL resultType = new TupleTypeHLSL("temp");
     for (int ff = 0; ff < fieldCount; ++ff)
     {
         fieldVals[ff] = GetElem(
             obj.GetFieldVal(ff),
             idx);
         resultType.AddField(
             obj.AggType.GetFieldName(ff),
             fieldVals[ff].Type);
     }
     return new TupleValHLSL(
         resultType,
         fieldVals);
 }