private void EnsureDiminsionInitializerIsValid() { CDictionaryType dict = Type.ActualType as CDictionaryType; if (dict != null) { return; } CArrayType array = Type.ActualType as CArrayType; if (array == null || arrayDimsinit != null) { return; } int count = array.Dimensions; CParameters @params = new CParameters(); for (int i = 0; i < count; i++) { @params.Unnamed.Add(null); } arrayDimsinit = @params; }
protected override bool canArrayConvert(CArrayType klass) { if (IndexType == klass.IndexType && ItemType.Resolved) { return(ItemType.ActualType.canConvertTo(klass.ItemType)); } return(false); }
private void GenerateMembers() { generatingMembers = true; // <snip> CMethod items = (CMethod)LookupMember("items"); CClass type = new CArrayType(1); items.LoadType(type); items.Function.LoadType(type); base.Scope.Clear(); foreach (CMember member in InheritedMemberIterator) { base.Scope.add(member); } generatingMembers = false; generatedMembers = true; }
public override bool Equals(Object obj) { if (!(obj is CArrayType)) { return(false); } if (ReferenceEquals(obj, this)) { return(true); } CArrayType other = (CArrayType)obj; if (NamePrefix != other.NamePrefix) { return(false); } if (!itemType.Resolved || !other.itemType.Resolved) { return(false); } if (!indexType.Equals(other.indexType)) { return(false); } if (dims != other.dims) { return(false); } return(itemType.Equals(other.itemType)); }
protected override bool canArrayConvert(CArrayType klass) { if (IndexType == klass.IndexType && ItemType.Resolved) return ItemType.ActualType.canConvertTo(klass.ItemType); return false; }
internal void Link(CArrayType aFrom) { linked.Add(aFrom); }
protected virtual bool canArrayConvert(CArrayType klass) { return(false); }
internal void AddArray(CArrayType array) { arrays++; classes["UNCALLABLE ARRAY " + arrays] = array; classesList.Add(array); }