示例#1
0
        public bool Scan(BinBuf binBuf, int pos)
        {
            if (!Run(binBuf, pos))
            {
                return(false);
            }

            m_scan = true;
            while (Proc())
            {
            }

            m_scan = false;
            return(true);
        }
示例#2
0
        public bool Run(BinBuf binBuf, long pos, bool gotoLock = false)
        {
            m_scan     = false;
            m_gotoLock = gotoLock;

            if (binBuf == null)
            {
                Error("CInterpreter::Run bin error");
                return(false);
            }

            m_bin  = binBuf.GetBase();
            m_size = binBuf.GetSize();
            m_pos  = pos;

            if (m_pos < 0 || m_pos >= m_size)
            {
                Error("CInterpreter::Run {0} pos error [0~{1}] limit", pos, m_size);
                return(false);
            }

            m_varMap.Clear();
            return(true);
        }