public BaseCoordTable GetFeatMaxCoordTable(FeatMinMaxRecord fmmr) { BaseCoordTable bct = null; if (fmmr != null) { if (fmmr.MaxCoordOffset != 0) { ushort offset = (ushort)(m_offsetMinMaxTable + fmmr.MaxCoordOffset); bct = new BaseCoordTable(offset, m_bufTable); } } return(bct); }
public FeatMinMaxRecord GetFeatMinMaxRecord(uint i) { FeatMinMaxRecord fmmr = null; if (i < FeatMinMaxCount) { uint sizeofFeatMinMaxRecord = 8; ushort offset = (ushort)(m_offsetMinMaxTable + i * sizeofFeatMinMaxRecord); if (offset + sizeofFeatMinMaxRecord <= m_bufTable.GetLength()) { fmmr = new FeatMinMaxRecord(offset, m_bufTable); } } return(fmmr); }
public BaseCoordTable_val GetFeatMaxCoordTable_val(FeatMinMaxRecord fmmr) { BaseCoordTable_val bct = null; if (fmmr != null) { if (fmmr.MaxCoordOffset != 0) { ushort offset = (ushort)(m_offsetMinMaxTable + fmmr.MaxCoordOffset); if (offset + 4 < m_bufTable.GetLength()) { bct = new BaseCoordTable_val(offset, m_bufTable); } } } return(bct); }
public bool Validate(Validator v, string sIdentity, OTTable table) { bool bRet = true; bRet &= ((val_BASE)table).ValidateNoOverlap(m_offsetMinMaxTable, CalcLength(), v, sIdentity, table.GetTag()); // check the MinCoordOffset if (MinCoordOffset == 0) { v.Pass(T.T_NULL, P.BASE_P_MinMaxTable_MinCO_0, table.m_tag, sIdentity); } else if (MinCoordOffset + m_offsetMinMaxTable > m_bufTable.GetLength()) { v.Error(T.T_NULL, E.BASE_E_MinMaxTable_MinCO, table.m_tag, sIdentity); bRet = false; } else { v.Pass(T.T_NULL, P.BASE_P_MinMaxTable_MinCO, table.m_tag, sIdentity); } // check the MaxCoordOffset if (MaxCoordOffset == 0) { v.Pass(T.T_NULL, P.BASE_P_MinMaxTable_MaxCO_0, table.m_tag, sIdentity); } else if (MaxCoordOffset + m_offsetMinMaxTable > m_bufTable.GetLength()) { v.Error(T.T_NULL, E.BASE_E_MinMaxTable_MaxCO, table.m_tag, sIdentity); bRet = false; } else { v.Pass(T.T_NULL, P.BASE_P_MinMaxTable_MaxCO, table.m_tag, sIdentity); } // check the FeatMinMaxRecords bool bFeatMinMaxRecordsOk = true; for (uint i = 0; i < FeatMinMaxCount; i++) { FeatMinMaxRecord fmmr = GetFeatMinMaxRecord(i); if (fmmr != null) { if (fmmr.MinCoordOffset + m_offsetMinMaxTable > m_bufTable.GetLength()) { v.Error(T.T_NULL, E.BASE_E_FeatMinMaxRecords_MinCO_offset, table.m_tag, sIdentity + ", FeatMinMaxRecord[" + i + "]"); bFeatMinMaxRecordsOk = false; bRet = false; } if (fmmr.MaxCoordOffset + m_offsetMinMaxTable > m_bufTable.GetLength()) { v.Error(T.T_NULL, E.BASE_E_FeatMinMaxRecords_MaxCO_offset, table.m_tag, sIdentity + ", FeatMinMaxRecord[" + i + "]"); bFeatMinMaxRecordsOk = false; bRet = false; } } else { bFeatMinMaxRecordsOk = false; } } if (bFeatMinMaxRecordsOk) { v.Pass(T.T_NULL, P.BASE_P_FeatMinMaxRecords_offsets, table.m_tag, sIdentity); } // check the BaseCoord Tables BaseCoordTable_val bct = null; bct = GetMinCoordTable_val(); if (bct != null) { bct.Validate(v, sIdentity, table); } bct = GetMaxCoordTable_val(); if (bct != null) { bct.Validate(v, sIdentity, table); } for (uint i = 0; i < FeatMinMaxCount; i++) { FeatMinMaxRecord fmmr = GetFeatMinMaxRecord(i); bct = GetFeatMinCoordTable_val(fmmr); if (bct != null) { bct.Validate(v, sIdentity, table); } bct = GetFeatMaxCoordTable_val(fmmr); if (bct != null) { bct.Validate(v, sIdentity, table); } } return(bRet); }
public BaseCoordTable GetFeatMaxCoordTable(FeatMinMaxRecord fmmr) { BaseCoordTable bct = null; if (fmmr != null) { if (fmmr.MaxCoordOffset != 0) { ushort offset = (ushort)(m_offsetMinMaxTable + fmmr.MaxCoordOffset); bct = new BaseCoordTable(offset, m_bufTable); } } return bct; }
public FeatMinMaxRecord GetFeatMinMaxRecord(uint i) { FeatMinMaxRecord fmmr = null; if (i < FeatMinMaxCount) { uint sizeofFeatMinMaxRecord = 8; ushort offset = (ushort)(m_offsetMinMaxTable + i*sizeofFeatMinMaxRecord); if (offset + sizeofFeatMinMaxRecord <= m_bufTable.GetLength()) { fmmr = new FeatMinMaxRecord(offset, m_bufTable); } } return fmmr; }
public BaseCoordTable_val GetFeatMaxCoordTable_val(FeatMinMaxRecord fmmr) { BaseCoordTable_val bct = null; if (fmmr != null) { if (fmmr.MaxCoordOffset != 0) { ushort offset = (ushort)(m_offsetMinMaxTable + fmmr.MaxCoordOffset); if (offset + 4 < m_bufTable.GetLength()) { bct = new BaseCoordTable_val(offset, m_bufTable); } } } return bct; }