Inheritance: TypeAlias
Example #1
0
        private Chan VisitChan(Chan chan)
        {
            WriteStart("chan {0} ", chan.Name.Name);
            this.VisitTypeReference(chan.ChannelType);
            WriteFinish(";");

            return chan;
        }
Example #2
0
 private Chan VisitChan(Chan chan)
 {
     chan.ChannelType = this.VisitTypeReference(chan.ChannelType);
     return chan;
 }
Example #3
0
 private Chan VisitChan(Chan chan)
 {
     if (chan == null) return null;
     Chan result = (Chan)this.VisitTypeAlias(chan);
     return result;
 }
Example #4
0
 private Chan VisitChan(Chan chan)
 {
     TypeNode tNode = this.VisitTypeExpression((TypeExpression)chan.ChannelType);
     chan.ChannelType = tNode;
     return chan;
 }
Example #5
0
 private Chan VisitChan(Chan chan)
 {
     if (chan == null) return null;
     chan.ChannelType = this.VisitTypeReference(chan.ChannelType);
     return chan;
 }
Example #6
0
        private void GenerateChan(Chan chanNode)
        {
            Expression ns = null;
            string chanStyle = null;

            switch (GetTypeClassification(chanNode.ChannelType))
            {
                case TypeClassification.Simple:
                    ns = chanNode.ChannelType.Namespace;
                    chanStyle = "SimpleChan"; break;
                case TypeClassification.Enum:
                    chanStyle = "EnumChan"; break;
                case TypeClassification.Struct:
                    chanStyle = "StructChan"; break;
                case TypeClassification.Heap:
                    if (chanNode.ChannelType == SystemTypes.Object)
                        ns = chanNode.ChannelType.Namespace;
                    chanStyle = "ComplexChan"; break;
            }
            Class chanClass = (Class)Templates.GetTypeTemplateByName(chanStyle);

            if (ns == null)
                ns = new QualifiedIdentifier(new Identifier("Microsoft.Zing"), new Identifier("Application"));

            Replacer.Replace(chanClass, chanStyle, chanNode.Name);
            Replacer.Replace(chanClass, "_ElementType", new QualifiedIdentifier(ns, chanNode.ChannelType.Name));
            SetTypeId(chanClass);
            InstallType(chanClass);
        }