public ExpandRet ExpandEntries_OrThrow(uint newEntriesCt, LimitEntries limits, bool throwOnNoChange = false) { ExpandRet ret = this.ExpandEntries(newEntriesCt, limits); this.ThrowErrorForExpandReturn(ret, throwOnNoChange); return(ret); }
public ExpandRet ExpandEntries(uint newEntriesCt, LimitEntries limits) { return (this._ExpandSize( newEntriesCt * limits.dataTypeSize, limits.minEntries * limits.dataTypeSize, limits.maxEntries * limits.dataTypeSize)); }
public DefTable(int index, Bin.TypeID type, uint initialElements, uint minEntries, uint maxEntries) { this.index = index; this.defSegments = new List <DefSegment>(); uint typeSize = DataStore.GetTypeIDSize(type); this.type = type; this.elements = initialElements; this.limits = new LimitEntries( typeSize, minEntries, maxEntries); }
public DataStore(uint initialEntryCt, LimitEntries limits, List <DefSegment> defaults, ExecutionContext globSrc) { this.storeAlignment = limits.dataTypeSize; this.ExpandEntries_OrThrow(initialEntryCt, limits); uint defaultSet = this.WriteDefSegmentsData(defaults, globSrc); if (defaultSet != 0) { uint reEleCt = defaultSet / limits.dataTypeSize; if (defaultSet % limits.dataTypeSize != 0) { ++reEleCt; } this.ExpandEntries_OrThrow(reEleCt, limits); if (this.WriteDefSegmentsData(defaults, globSrc) != 0) { throw new System.Exception("Unknown issue setting default store values for Table."); } } }