Пример #1
0
        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);
        }
Пример #2
0
        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);
        }