Exemplo n.º 1
0
            public bool Validate(Validator v, string sIdentity, OTTable table)
            {
                bool bRet = true;

                // check for data overlap
                bRet &= ((val_JSTF)table).ValidateNoOverlap(m_offsetJstfLangSys, CalcLength(), v, sIdentity, table.GetTag());

                // check the JstfPriority array length
                if (m_offsetJstfLangSys + (uint)FieldOffsets.JstfPriorityOffsets + JstfPriorityCount * 2 > m_bufTable.GetLength())
                {
                    v.Error(T.T_NULL, E.JSTF_E_Array_pastEOT, table.m_tag, sIdentity + ", JstfPriority array");
                    bRet = false;
                }

                // check each JstfPriority offset
                for (uint i = 0; i < JstfPriorityCount; i++)
                {
                    if (m_offsetJstfLangSys + GetJstfPriorityOffset(i) > m_bufTable.GetLength())
                    {
                        v.Error(T.T_NULL, E.JSTF_E_Offset_PastEOT, table.m_tag, sIdentity + ", JstfPriority[" + i + "]");
                        bRet = false;
                    }
                }

                // check each JstfPriority table
                for (uint i = 0; i < JstfPriorityCount; i++)
                {
                    JstfPriority_val jp = GetJstfPriorityTable_val(i);
                    bRet &= jp.Validate(v, sIdentity + ", JstfPriority[" + i + "]", table);
                }

                return(bRet);
            }
Exemplo n.º 2
0
            public JstfPriority_val GetJstfPriorityTable_val(uint i)
            {
                JstfPriority_val jp = null;

                if (i < JstfPriorityCount)
                {
                    uint offset = m_offsetJstfLangSys + (uint)GetJstfPriorityOffset(i);
                    jp = new JstfPriority_val((ushort)offset, m_bufTable);
                }

                return(jp);
            }
Exemplo n.º 3
0
            public JstfPriority_val GetJstfPriorityTable_val(uint i)
            {
                JstfPriority_val jp = null;

                if (i < JstfPriorityCount)
                {
                    uint offset = m_offsetJstfLangSys + (uint)GetJstfPriorityOffset(i);
                    jp = new JstfPriority_val((ushort)offset, m_bufTable);
                }

                return jp;
            }