public void AddGlobalEnum(EnumStruct es) { if (GetGlobalStructByName(es.Name) != null) { throw new AnalysisException(String.Format("redefine {0} global enum", es.Name)); } global_enum_.Add(es); }
protected void AnalyseGlobalEnum(XmlElement e) { string name = XmlUtil.GetAttrStrVal(e, "name", ""); if (name == "") { throw new exception.AnalysisException(String.Format("pro-region/global-enum/enum node must define a name")); } EnumStruct es = new EnumStruct(name, this); es.LoadFromXml(e); ProMetaHelper.Instance().AddGlobalEnum(es); }