示例#1
0
文件: tsContent.cs 项目: emm274/fcObj
 public jsonContent(jsonListener Aparent,
                    tsContentTo Adoc) : base(Aparent)
 {
     fData = new jsonData(this,Adoc);
     fdoc = Adoc;
 }
示例#2
-1
文件: tsContent.cs 项目: emm274/fcObj
        public bool ParseStream(StreamReader stream, tmessage message)
        {
            fjson = new XJson();
            fjson.message = message;
            fjson.setListener(this);

            bool rc = true;
            if (fdoc != null) {
                tsContentBound bound = new tsContentBound();

                jsonData temp = fData;
                fData = new jsonData(this, bound);

                fjson.setListener(this);
                fjson.Parse(stream);

                fData = temp;

                if (bound.count > 0)
                rc = fdoc.Bound(bound.minLat, bound.minLon, bound.maxLat, bound.maxLon);
            }

            if (rc) 
            if (fdoc == null)
                rc=ParseStage(stream,0);
            else
                for(int i=0; i < fdoc.GetStageCount(); i++ )
                rc=ParseStage(stream,i);

            if (rc) fData.log(message);

            fjson.Close();

            return rc; 
        }