public void AddProRegion(ProRegion pr) { if (GetProRegionByName(pr.RegionName) != null) { throw new AnalysisException(String.Format("redefine {0} region name", pr.RegionName)); } pro_region_.Add(pr); }
public ProMeta(ProRegion o, int proidv) { this.pro_iid_v_ = proidv; this.owner_ = o; }
public void InitMeta() { FileUtil.GetCurPath(); string xmlpath = FileUtil.GetPath(FileUtil.GetCurPath(), ProMetaConst.XML_SUBDIR); List <string> buildorder = new List <string>(); { string ord = FileUtil.GetFile(xmlpath, ProMetaConst.XML_ANALYSEORDER); if (FileUtil.IsFileExist(ord)) { XmlUtil xu = new XmlUtil(ord); List <XmlElement> mls = XmlUtil.GetChildrenElement(xu.Root, "xml"); foreach (XmlElement e1 in mls) { buildorder.Add(XmlUtil.GetElementText(e1)); } } } List <ProRegion> pros = new List <ProRegion>(); { List <string> allxml = FileUtil.ListFilesOfDir(xmlpath, "*.xml"); foreach (string xml in allxml) { string p = FileUtil.GetFile(xmlpath, xml); try { XmlUtil xu = new XmlUtil(p); ProRegion pr = new ProRegion(xu); pr.RegionName = FileUtil.GetFileNameWithoutExtension(p); pros.Add(pr); } catch (Exception se) { LoggerHelper.GenError(String.Format("{0} analyse failed............(X)", xml)); throw se; } } } //sort for (int ind = buildorder.Count - 1; ind >= 0; --ind) { foreach (ProRegion r in pros) { if (r.RegionName == buildorder[ind]) { pros.Remove(r); pros.Insert(0, r); break; } } } //load foreach (ProRegion r in pros) { try { r.AnalyseProRegion(); this.AddProRegion(r); } catch (Exception se) { LoggerHelper.GenError(String.Format("{0} analyse failed............(X)", r.Xml)); throw se; } } }
public GlobalStruct(string name, ProRegion o) { this.owner_ = o; this.name_ = name; }
public EnumStruct(string name, ProRegion o) { this.name_ = name; this.owner_ = o; }
public MacroDefine(string name, ProRegion o) { this.name_ = name; this.owner_ = o; }