예제 #1
0
        public string _ToNormalizedString(bool Normalized)
        {
#if false
            // Reversed logical order (used on C on the right side).

            var   Output = "";
            CType that   = this;
            while (that != null && that is CArrayType)
            {
                var thata = that as CArrayType;
                Output = "[" + thata.Size + "]" + Output;
                that   = thata.ElementCType;
            }

            var ChildString = (that != null) ? (Normalized ? that.ToNormalizedString() : that.ToString()) : "#ERROR#";

            return((ChildString + Output).TrimEnd());
#else
            // Logical order.

            var ChildString = (ElementCType != null) ? (Normalized ? ElementCType.ToNormalizedString() : ElementCType.ToString()) : "#ERROR#";

            return((ChildString + "[" + Size + "]").TrimEnd());
#endif
        }
예제 #2
0
        public override string ToString()
        {
            string Output = "";

            Output += (ElementCType != null) ? ElementCType.ToString() : "#ERROR#";
            Output += " * ";
            if (Qualifiers != null)
            {
                Output += String.Join(" ", Qualifiers.Where(Qualifier => Qualifier != null));
            }
            return(Output.TrimEnd());
        }
예제 #3
0
     public override CSimpleType GetCSimpleType()
     {
         if (ElementCType == null)
         {
             return new CSimpleType()
                    {
                        BasicType = CTypeBasic.Void
                    }
         }
         ;
         return(ElementCType.GetCSimpleType());
     }
 }