コード例 #1
0
        public void Parse(ref byte[] buff, ref int position)
        {
            int sectionSize = Common.GetUint(ref buff, ref position);
            int _old;

            while (sectionSize > sizeof(int))
            {
                _old = position;
                SectionID sectionID = Common.GetSectionId(ref buff, ref position);
                switch (sectionID)
                {
                case SectionID.Sdec:
                    Sdec.Parse(ref buff, ref position);
                    break;

                case SectionID.Ctab:
                    Ctab ctab = new Ctab();
                    ctab.Parse(ref buff, ref position);
                    Ctabs.Add(ctab);
                    break;

                case SectionID.Cntt:
                    break;

                default: throw new ApplicationException("Unknown CASM sub structure!");
                }
                sectionSize -= (position - _old);
            }
        }
コード例 #2
0
 public CSEGStructure()
 {
     Sdec  = new Sdec();
     Ctabs = new List <Ctab>();
     Cntts = new List <Cntt>();
 }