private static EnumElement ParseEnum(string fileName, XElement enm)
        {
            try
            {
                //SrcML doesn't seem to parse access level specifiers for enums, so just pretend they are all public for now
                AccessLevel accessLevel = AccessLevel.Public;

                string name = "";
                int definitionLineNumber = 0;
                int definitionColumnNumber=0;
                if (enm.Element(SRC.Name) != null)
                {
                    SrcMLParsingUtils.ParseNameAndLineNumber(enm, out name, out definitionLineNumber, out definitionColumnNumber);
                }
                else
                {
                    //enums in C++ aren't required to have a name
                    name = ProgramElement.UndefinedName;
                    definitionLineNumber = Int32.Parse(enm.Attribute(POS.Line).Value);
                }

                //parse namespace
                IEnumerable<XElement> ownerNamespaces =
                    from el in enm.Ancestors(SRC.Declaration)
                    where el.Element(SRC.Type) != null &&
                            el.Element(SRC.Type).Element(SRC.Name) != null &&
                            el.Element(SRC.Type).Element(SRC.Name).Value == "namespace"
                    select el;
                string namespaceName = String.Empty;
                foreach (XElement ownerNamespace in ownerNamespaces)
                {
                    foreach (XElement spc in ownerNamespace.Elements(SRC.Name))
                    {
                        namespaceName += spc.Value + " ";
                    }
                }
                namespaceName = namespaceName.TrimEnd();

                //parse values
                XElement block = enm.Element(SRC.Block);
                string values = String.Empty;
                if (block != null)
                {
                    IEnumerable<XElement> exprs =
                        from el in block.Descendants(SRC.Expression)
                        select el;
                    foreach (XElement expr in exprs)
                    {
                        IEnumerable<XElement> enames = expr.Elements(SRC.Name);
                        foreach (XElement ename in enames)
                        {
                            values += ename.Value + " ";
                        }
                    }
                    values = values.TrimEnd();
                }

                string fullFilePath = System.IO.Path.GetFullPath(fileName);
                string source = SrcMLParsingUtils.RetrieveSource(enm);
                var enumParsed = new EnumElement(name, definitionLineNumber, definitionColumnNumber, fullFilePath, source, accessLevel, namespaceName, values);
                return enumParsed;
            }
            catch (Exception error)
            {
                FileLogger.DefaultLogger.Info("Exception in SrcMLCppParser " + error.Message + "\n" + error.StackTrace);
                return null;
            }
        }
 public EnumDocument(EnumElement enumElement)
     : base(enumElement)
 {
 }