예제 #1
0
파일: DoxProperty.cs 프로젝트: codaxy/dox
        /// <summary>
        /// Read Dox.Propety information from the DoxygenXML model object, by
        /// parsing the related (xml) sections. 
        /// </summary>
        /// <param name="property">
        /// A <see cref="Codaxy.Dox.Property"/>
        /// </param>
        /// <param name="mdt">
        /// A <see cref="memberdefType"/>
        /// </param>
        public static void ReadDoxygenMember(this Codaxy.Dox.Property property, memberdefType mdt)
        {
            if (property.RefId.Equals(mdt.id))
            {

                // desc
                if (property.DescriptionTree == null) property.DescriptionTree = new List<DescriptionSegment>();
                    mdt.briefdescription.GetDescription(property.DescriptionTree);
                    mdt.detaileddescription.GetDescription(property.DescriptionTree);

                // Protection
                if (mdt.protSpecified)
                    property.ProtectionLevel = ParserTools.ParseProtectionLevel(mdt.prot.ToString());

                // Property return type
                if (mdt.type != null && mdt.type.Text != null){
                    // check for ovveride in type error
                    if (mdt.type.Text[0].StartsWith("override")){
                        mdt.type.Text[0] = mdt.type.Text[0].TrimStart("override".ToCharArray());
                        property.MemberFlag |= MemberFlag.OVERRIDEN;
                    }
                    property.TypeName = mdt.type.Text[0];
                }

            }
        }
예제 #2
0
파일: DoxMethod.cs 프로젝트: codaxy/dox
        /// <summary>
        /// Read Dox.Field information from the DoxygenXML model object, by
        /// parsing the related (xml) sections. 
        /// </summary>
        /// <param name="method">
        /// A <see cref="Codaxy.Dox.Method"/>
        /// </param>
        /// <param name="mdt">
        /// A <see cref="memberdefType"/>
        /// </param>
        public static void ReadDoxygenMember(this Codaxy.Dox.Method method , memberdefType mdt)
        {
            // Existing method and new method information
            if (method.RefId.Equals(mdt.id)){

                // desc
                if (method.DescriptionTree == null) method.DescriptionTree = new List<DescriptionSegment>();
                mdt.briefdescription.GetDescription(method.DescriptionTree);
                mdt.detaileddescription.GetDescription(method.DescriptionTree);
                method.ReturnDescription = mdt.detaileddescription.GetMethodReturnDescription();

                // Protection
                if (mdt.protSpecified)
                method.ProtectionLevel = ParserTools.ParseProtectionLevel(mdt.prot.ToString());

                // Exception
                //if (mdt.exceptions != null)
                //method.Exception = mdt.exceptions.Text.ToString();

                // Method flags
                if ([email protected](DoxBool.yes)) method.MemberFlag |= MemberFlag.STATIC;
                if (mdt.virtSpecified && mdt.virt.Equals(DoxVirtualKind.@virtual))
                    method.MemberFlag |= MemberFlag.VIRTUAL;

                // Method return type
                if (mdt.type != null && mdt.type.Text != null){
                    // check for ovveride in type error
                    if (mdt.type.Text[0].StartsWith("override")){
                        mdt.type.Text[0] = mdt.type.Text[0].TrimStart("override".ToCharArray());
                        method.MemberFlag |= MemberFlag.OVERRIDEN;
                    }
                    method.TypeName = mdt.type.Text[0];
                }

                // Method params
                if (mdt.param != null){
                    if (method.Parameters == null) method.Parameters = new List<Parameter>();
                    foreach(paramType para in mdt.param)
                        method.Parameters.Add(para.GetParam(mdt.detaileddescription));
                }

            }
        }
예제 #3
0
파일: DoxType.cs 프로젝트: codaxy/dox
 /// <summary>
 /// Loop through all possible Dox.Type members, and parse their information. 
 /// </summary>
 /// <param name="type">
 /// A <see cref="Codaxy.Dox.Type"/>
 /// </param>
 /// <param name="memdefType">
 /// A <see cref="memberdefType"/>
 /// </param>
 public static void ReadDoxygenMember(this Codaxy.Dox.Type type, memberdefType memdefType)
 {
     if (type.Methods != null)
     foreach(Codaxy.Dox.Method method in type.Methods){
         method.ReadDoxygenMember(memdefType);
         method.DeclaringType = type.FullName;
     }
     if (type.Fields != null)
     foreach(Codaxy.Dox.Field field in type.Fields){
         field.ReadDoxygenMember(memdefType);
         field.DeclaringType = type.FullName;
     }
     if (type.Properties != null)
     foreach(Codaxy.Dox.Property property in type.Properties){
         property.ReadDoxygenMember(memdefType);
         property.DeclaringType = type.FullName;
     }
 }