csdoc-patches Mailing List for C Sharp Document Generator (XML/HTML)
Status: Planning
Brought to you by:
mastergaurav
You can subscribe to this list here.
2003 |
Jan
|
Feb
(46) |
Mar
(17) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(65) |
Nov
(17) |
Dec
|
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14752 Added Files: AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * AttributeDoc.cs, * ClassDoc.cs, * ClassDocList.cs, * DocTreeGenerator.cs, * NamespaceDoc.cs, * RootDoc.cs : Core library that implements the framework. --- NEW FILE: AttributeDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: AttributeDoc.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; namespace MCSDoc.Framework { internal class AttributeDoc : ClassDoc, IAttributeDoc { private AccessFlags flags; private AttributeTargets targets; public AttributeDoc(Class klass) : base(klass) { if(!base.IsAttribute) throw new Exception("[AttributeDoc] Class is not an attribute"); } public AccessFlags Flags { get { throw new NotImplementedException(); } } public AttributeTargets Targets { get { throw new NotImplementedException(); } } } } --- NEW FILE: ChangeLog --- $Id: ChangeLog,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ 2004-11-09 Gaurav Vaish <mastergaurav> * AttributeDoc.cs, * ClassDoc.cs, * ClassDocList.cs, * DocTreeGenerator.cs, * NamespaceDoc.cs, * RootDoc.cs : Core library that implements the framework. --- NEW FILE: ClassDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: ClassDoc.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; using System.Collections; namespace MCSDoc.Framework { internal class ClassDoc : IClassDoc, IComparable { private Class klass; private string name; private bool isException = false; private bool isAttribute = false; private IClassDoc baseClass = null; private IInterfaceDoc[] interfaces = null; private IContainerDoc container = null; public ClassDoc(Class klass) { this.klass = klass; // need to Set - BaseClass, Interfaces, Container throw new NotImplementedException(); } private void Parse() { /* ArrayList bases = klass.Bases; if(bases != null || bases.Count > 0) { // } */ if(klass.BaseType != null) { isAttribute = IsSubtypeOf(TypeManager.attribute_type); isException = IsSubtypeOf(TypeManager.exception_type); } } private bool IsSubtypeOf(Type type) { Type baseType = klass.BaseType; while(baseType != null && baseType.ToString() != type.ToString()) { if(baseType.IsSubclassOf(type)) return true; baseType = baseType.BaseType; } return false; } protected Class Class { get { return this.klass; } } public string NamespaceName { get { throw new NotImplementedException(); } } public string Comments { get { throw new NotImplementedException(); } } public AccessFlags AccessFlags { get { throw new NotImplementedException(); } } public string Name { get { return name; } } public bool IsContained { get { return this.container != null; } } public bool IsException { get { return isException; } } public bool IsAttribute { get { return isAttribute; } } public IClassDoc BaseClass { get { return baseClass; } } public IInterfaceDoc[] Interfaces { get { return interfaces; } } public IContainerDoc ContainerDoc { get { return this.container; } } public IAttributeDoc[] Attributes { get { throw new NotImplementedException(); } } public IMethodDoc[] Methods { get { throw new NotImplementedException(); } } public IPropertyDoc[] Properties { get { throw new NotImplementedException(); } } public IFieldDoc[] Fields { get { throw new NotImplementedException(); } } public IClassDoc[] InnerClasses { get { throw new NotImplementedException(); } } public IDelegateDoc[] InnerDelegates { get { throw new NotImplementedException(); } } public IEnumDoc[] InnerEnums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] InnerInterfaces { get { throw new NotImplementedException(); } } public IStructDoc[] InnerStructs { get { throw new NotImplementedException(); } } public int CompareTo(object obj) { if(obj is ClassDoc) { ClassDoc other = (ClassDoc) obj; string otherName = other.Name; if(other.NamespaceName == this.NamespaceName) { return (this.Name.CompareTo(other.Name)); } // I know this is wrong. return NamespaceName.CompareTo(other.NamespaceName); } throw new ArgumentException("[CompareTo] obj is not of" + " type ClassDoc"); } } } --- NEW FILE: ClassDocList.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: ClassDocList.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; using System.Collections; namespace MCSDoc.Framework { public class ClassDocList : IEnumerable { private ArrayList classDocs = new ArrayList(); public ClassDocList() { } public ClassDocList(ArrayList classDocs) { if(classDocs != null) { foreach(object c in classDocs) { if(c is IClassDoc) Add((IClassDoc)c); } } } public IClassDoc this[int index] { get { if(index >= 0 && index < classDocs.Count) { return (IClassDoc)classDocs[index]; } throw new ArgumentException();//IndexOutOfRangeException(); } set { classDocs[index] = value; } } public int Count { get { return classDocs.Count; } } public void Add(IClassDoc classDoc) { classDocs.Add(classDoc); } public bool Contains(IClassDoc classDoc) { return classDocs.Contains(classDoc); } public IEnumerator GetEnumerator() { return classDocs.GetEnumerator(); } } } --- NEW FILE: DocTreeGenerator.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: DocTreeGenerator.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion namespace MCSDoc.Framework { internal class DocTreeGenerator { private TypeContainer root = null; private RootDoc rootDoc = null; private ArrayList allNamespaces = new ArrayList(); private ArrayList allClasses = new ArrayList(); private ArrayList allStructs = new ArrayList(); private ArrayList allDelegates = new ArrayList(); private ArrayList allEnums = new ArrayList(); private ArrayList allInterfaces = new ArrayList(); public DocTreeGenerator(TypeContainer root) { if(root == null) { throw new ArgumentException("[DocTreeGenerator] Null root"); } this.root = root; //rootDoc = new RootDoc(root); ParseAndGenerate(); } private void ParseAndGenerate() { //rootDoc.Parse(root); //ParseContainers(root.Types); //ParseDelegates(root.Delegates); //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ParseContainer(root); //First need to populate [allNamespaces] //or should I populate while generating tree? ParseNamespaces(); GenerateTree(); } private void GenerateTree() { rootDoc = new RootDoc(); //Need to add ONLY namespaces and all types //that are not inside any namespace. //Namespaces will recursively contain all the //types that are within any namespace. //Now, I will go home today and work on the //exact logic for whole of this system! throw new NotImplementedException(); } private void ParseNamespaces() { foreach(IClassDoc cd in this.allClasses) { if(cd.NamespaceName != null) { OptNamespaceAdd(cd.NamespaceName); } } foreach(IStructDoc sd in this.allStructs) { if(sd.NamespaceName != null) { OptNamespaceAdd(sd.NamespaceName); } } foreach(IEnumDoc ed in this.allEnums) { /** if(ed.NamespaceEntry.FullName != null) { OptNamespaceAdd(ed.NamespaceName); } */ } foreach(IInterfaceDoc id in this.allInterfaces) { /** if(id.NamespaceEntry.FullName != null) { OptNamespaceAdd(id.NamespaceName); } */ } foreach(IDelegateDoc dd in this.allDelegates) { /** if(dd.NamespaceEntry.FullName != null) { OptNamespaceAdd(dd.NamespaceName); } */ } } private void OptNamespaceAdd(string name) { foreach(NamespaceDoc current in allNamespaces) { if(current.Name == name) { return; } } NamespaceDoc nsd = new NamespaceDoc(name); allNamespaces.Add(nsd); } private void HandleNamespaceClass(Class klass, IClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, IEnumDoc doc) { NamespaceDoc nsd = NamespaceLookup(eenum.NamespaceEntry.FullName); nsd.AddEnumDoc(doc); } private NamespaceDoc NamespaceLookup(string name) { throw new NotImplementedException(); } private void ParseContainers(ArrayList containers) { if(containers != null && containers.Count > 0) { foreach(TypeContainer tc in containers) { ParseContainer(tc); } } } private void ParseContainer(TypeContainer container) { if(container != null) { if(container is Class) { Class c = (Class) container; IClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] // c.BaseType.IsSubclassOf(typeof(System.Attribute)) // || c.BaseType.IsSubclassOf(typeof(MCSAssembly.typeof(System.Attribute)) if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } else { cd = new ClassDoc(c); } allClasses.Add(cd); } else if(container is Struct) { Struct s = (Struct) container; IStructDoc sd = null;//new IStructDoc(s); allStructs.Add(sd); } //Handle all inner types recursively ParseContainers(container.Types); ParseDelegates(container.Delegates); ParseEnums(container.Enums); ParseInterfaces(container.Interfaces); } } private void ParseDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { foreach(Mono.CSharp.Delegate deleg in delegates) { IDelegateDoc dd = null;//new DelegateDoc(deleg); allDelegates.Add(dd); } } } private void ParseEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { foreach(Mono.CSharp.Enum eenum in enums) { IEnumDoc ed = null;//new EnumDoc(eenum); allDelegates.Add(ed); } } } private void ParseInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { foreach(Interface interf in interfaces) { IInterfaceDoc id = null;//new InterfaceDoc(interf); allInterfaces.Add(id); } } } public IRootDoc RootDoc { get { return rootDoc; } } } } --- NEW FILE: NamespaceDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: NamespaceDoc.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; using System.Collections; namespace MCSDoc.Framework { internal class NamespaceDoc : INamespaceDoc { private string comments; private string name; ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); ArrayList delegates = new ArrayList(); ArrayList enums = new ArrayList(); ArrayList interfaces = new ArrayList(); public NamespaceDoc(string name) { this.name = name; } public NamespaceDoc(string name, string filename) : this(name) { throw new NotImplementedException(); } /// <summary> /// Will create a hierarchy of NamespaceDoc elements. /// </summary> /// <remarks> /// btw, do I really need this scrap funda of Parent namespace /// and sub-namespaces? /// </remarks> public static ArrayList CreateHierarchy(ArrayList namespaces) { ArrayList retVal = new ArrayList(); string name; string[] subNames; if(namespaces != null && namespaces.Count > 0) { foreach(NamespaceDoc nd in namespaces) { name = nd.Name; bool isAdded = IsNamespaceAdded(name, retVal); /* if(!isAdded) { subNames = GetSubnames(name); if(subNames != null) { foreach(string subName in subNames) { isAdded &= IsNamespaceAdded(subName, retVal); if(isAdded) break; } } } */ AddNamespaceInHierarchy(nd, retVal); throw new NotImplementedException(); } throw new NotImplementedException(); } throw new NotImplementedException(); } private static void AddNamespaceInHierarchy(NamespaceDoc doc, ArrayList docList) { throw new NotImplementedException(); } private static bool IsNamespaceAdded(string name, ArrayList namespaces) { foreach(NamespaceDoc nsd in namespaces) { if(IsNamespaceAdded(name, nsd)) { return true; } } return false; } private static bool IsNamespaceAdded(string name, NamespaceDoc doc) { throw new NotImplementedException(); } private static string[] GetSubnames(string name) { int dotCount = 0; foreach(char c in name) { if(c == '.') dotCount++; } if(dotCount == 0) return null; int[] dotIndices = new int[dotCount]; int cIndex = 0; int cPos = 0; for(cPos = 0; cPos < name.Length; cPos++) { if(name[cPos] == '.') { dotIndices[cIndex] = cPos; cIndex++; } } string[] retVal = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { retVal[cIndex] = name.Substring(0, dotIndices[cIndex] - 1); } return retVal; } public void AddClassDoc(IClassDoc doc) { classes.Add(doc); } public void AddStructDoc(IStructDoc doc) { structs.Add(doc); } public void AddDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } public void AddEnumDoc(IEnumDoc doc) { enums.Add(doc); } public void AddInterfaceDoc(IInterfaceDoc doc) { interfaces.Add(doc); } public string Name { get { return this.name; } } public string Comments { get { return comments; } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { return (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } } public IDelegateDoc[] Delegates { get { return (IDelegateDoc[]) delegates.ToArray(typeof(IDelegateDoc)); } } public IEnumDoc[] Enums { get { return (IEnumDoc[]) enums.ToArray(typeof(IEnumDoc)); } } public IInterfaceDoc[] Interfaces { get { return (IInterfaceDoc[]) interfaces.ToArray(typeof(IInterfaceDoc)); } } public IStructDoc[] Structs { get { return (IStructDoc[]) interfaces.ToArray(typeof(IStructDoc)); } } } } --- NEW FILE: RootDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: $Author: mastergaurav $ * Web: http://csdoc.sourceforge.net * * $Id: RootDoc.cs,v 1.1 2004/11/09 09:00:07 mastergaurav Exp $ * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; using System.Collections; namespace MCSDoc.Framework { internal class RootDoc : IRootDoc { INamespaceDoc[] namespaces = null; IClassDoc[] classes = null; IStructDoc[] structs = null; IDelegateDoc[] delegates = null; IEnumDoc[] enums = null; IInterfaceDoc[] interfaces = null; ArrayList namespaceList = new ArrayList(); public RootDoc(TypeContainer root) { //Parse(root); } public RootDoc() { //Do nothing! } private void Parse(TypeContainer root) { PopulateContainers(root.Types); throw new NotImplementedException(); } private void PopulateNamespaces() { if(namespaceList.Count > 0) { //namespaces = (INamespaceDoc[]) namespaceList.ToArray(typeof(INamespaceDoc)); } } private void PopulateContainers(ArrayList containers) { if(containers != null || containers.Count > 0) { ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); foreach(TypeContainer tc in containers) { if(tc is Class) { Class c = (Class)tc; ClassDoc cd = null; if(c.BaseType != null) { if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } } else { cd = new ClassDoc(c); } if(c.NamespaceEntry != null && c.NamespaceEntry.FullName.Length > 0) { HandleNamespaceClass(c, cd); } // process ClassDoc classes.Add(cd); } else if(tc is Struct) { Struct s = (Struct)tc; IStructDoc sd = null;//new StructDoc(s); if(s.NamespaceEntry != null && s.NamespaceEntry.FullName.Length > 0) { HandleNamespaceStruct(s, sd); } // process StructDoc structs.Add(sd); } PopulateInners(tc.Types); } if(classes.Count > 0) { this.classes = (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } if(structs.Count > 0) { this.structs = (IStructDoc[]) classes.ToArray(typeof(IStructDoc)); } } } private NamespaceDoc NamespaceLookup(string name) { NamespaceDoc retVal = null; foreach(NamespaceDoc current in namespaceList) { if(current.Name == name) { retVal = current; break; } } if(retVal == null) { retVal = new NamespaceDoc(name); namespaceList.Add(retVal); } return retVal; } private void HandleNamespaceClass(Class klass, ClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void PopulateInners(ArrayList types) { throw new NotImplementedException(); } private void PopulateEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { ArrayList enumDocs = new ArrayList(); IEnumDoc doc = null; foreach(Mono.CSharp.Enum current in enums) { doc = null;//new EnumDoc(current); enumDocs.Add(doc); } if(enumDocs.Count > 0) { this.enums = (IEnumDoc[]) enumDocs.ToArray(typeof(IEnumDoc)); } } } private void PopulateDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { ArrayList delegateDocs = new ArrayList(); IDelegateDoc doc = null; foreach(Mono.CSharp.Delegate current in delegates) { doc = null;//new DelegateDoc(current); delegateDocs.Add(doc); } if(delegateDocs.Count > 0) { this.delegates = (IDelegateDoc[]) delegateDocs.ToArray(typeof(IDelegateDoc)); } } } private void PopulateInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { ArrayList interfaceDocs = new ArrayList(); IInterfaceDoc doc = null; foreach(Interface current in interfaces) { doc = null;//new InterfaceDoc(current); interfaceDocs.Add(doc); } if(interfaceDocs.Count > 0) { this.interfaces = (IInterfaceDoc[]) interfaceDocs.ToArray(typeof(IInterfaceDoc)); } } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { throw new NotImplementedException(); } } public IDelegateDoc[] Delegates { get { throw new NotImplementedException(); } } public IEnumDoc[] Enums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] Interfaces { get { throw new NotImplementedException(); } } public IStructDoc[] Structs { get { throw new NotImplementedException(); } } } } |
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14563 Modified Files: ChangeLog Removed Files: AttributeDoc.cs ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * AttributeDoc.cs, * ClassDoc.cs, * ClassDocList.cs, * DocTreeGenerator.cs, * NamespaceDoc.cs, * RootDoc.cs : Not a part of the framework. It will be part of core library that implements the framework. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 9 Nov 2004 08:56:40 -0000 1.2 --- ChangeLog 9 Nov 2004 08:59:05 -0000 1.3 *************** *** 3,6 **** --- 3,16 ---- 2004-11-09 Gaurav Vaish <mastergaurav> + * AttributeDoc.cs, + * ClassDoc.cs, + * ClassDocList.cs, + * DocTreeGenerator.cs, + * NamespaceDoc.cs, + * RootDoc.cs : Not a part of the framework. It will be part of core + library that implements the framework. + + 2004-11-09 Gaurav Vaish <mastergaurav> + * *.cs : Clean up of comments and don't use Mono.CSharp namespace --- AttributeDoc.cs DELETED --- --- ClassDoc.cs DELETED --- --- ClassDocList.cs DELETED --- --- DocTreeGenerator.cs DELETED --- --- NamespaceDoc.cs DELETED --- --- RootDoc.cs DELETED --- |
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14261 Modified Files: AccessFlags.cs AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IAttributeDoc.cs IClassDoc.cs IContainerDoc.cs IDelegateDoc.cs IEnumDoc.cs IFieldDoc.cs IInterfaceDoc.cs IMethodDoc.cs INamespaceDoc.cs IPropertyDoc.cs IRootDoc.cs IStructDoc.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Clean up of comments and don't use Mono.CSharp namespace Index: AccessFlags.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/AccessFlags.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AccessFlags.cs 9 Nov 2004 08:47:21 -0000 1.1 --- AccessFlags.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,18 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion - using Mono.CSharp; using System; ! namespace MCSDoc { public enum AccessFlags --- 2,17 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion using System; ! namespace MCSDoc.Framework { public enum AccessFlags Index: AttributeDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/AttributeDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AttributeDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- AttributeDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,16 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ - using Mono.CSharp; using System; ! namespace MCSDoc { internal class AttributeDoc : ClassDoc, IAttributeDoc --- 1,17 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion using System; ! namespace MCSDoc.Framework { internal class AttributeDoc : ClassDoc, IAttributeDoc Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 9 Nov 2004 08:47:21 -0000 1.1 --- ChangeLog 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 3,6 **** --- 3,10 ---- 2004-11-09 Gaurav Vaish <mastergaurav> + * *.cs : Clean up of comments and don't use Mono.CSharp namespace + + 2004-11-09 Gaurav Vaish <mastergaurav> + * *.cs : Import from old mcsdoc Index: ClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/ClassDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClassDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- ClassDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; - using Mono.CSharp; ! namespace MCSDoc { internal class ClassDoc : IClassDoc, IComparable --- 1,18 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion using System; using System.Collections; ! namespace MCSDoc.Framework { internal class ClassDoc : IClassDoc, IComparable Index: ClassDocList.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/ClassDocList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClassDocList.cs 9 Nov 2004 08:47:21 -0000 1.1 --- ClassDocList.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ using System; - using Mono.CSharp; using System.Collections; ! namespace MCSDoc { public class ClassDocList : IEnumerable --- 1,18 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion using System; using System.Collections; ! namespace MCSDoc.Framework { public class ClassDocList : IEnumerable Index: DocTreeGenerator.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/DocTreeGenerator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DocTreeGenerator.cs 9 Nov 2004 08:47:21 -0000 1.1 --- DocTreeGenerator.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! using System; ! using System.Collections; ! ! namespace MCSDoc { internal class DocTreeGenerator --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { internal class DocTreeGenerator Index: IAttributeDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IAttributeDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IAttributeDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IAttributeDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,16 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! using System; ! ! namespace MCSDoc { public interface IAttributeDoc : IClassDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IAttributeDoc : IClassDoc Index: IClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IClassDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IClassDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IClassDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IClassDoc : IContainerDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IClassDoc : IContainerDoc Index: IContainerDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IContainerDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IContainerDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IContainerDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IContainerDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IContainerDoc Index: IDelegateDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IDelegateDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IDelegateDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IDelegateDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IDelegateDoc --- 2,15 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion ! namespace MCSDoc.Framework { public interface IDelegateDoc Index: IEnumDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IEnumDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IEnumDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IEnumDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IEnumDoc --- 2,15 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion ! namespace MCSDoc.Framework { public interface IEnumDoc Index: IFieldDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IFieldDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IFieldDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IFieldDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IFieldDoc --- 2,15 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion ! namespace MCSDoc.Framework { public interface IFieldDoc Index: IInterfaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IInterfaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IInterfaceDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IInterfaceDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IInterfaceDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IInterfaceDoc Index: IMethodDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IMethodDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IMethodDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IMethodDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IMethodDoc --- 2,15 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion ! namespace MCSDoc.Framework { public interface IMethodDoc Index: INamespaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/INamespaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** INamespaceDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- INamespaceDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface INamespaceDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface INamespaceDoc Index: IPropertyDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IPropertyDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPropertyDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IPropertyDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 2,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ #endregion ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IPropertyDoc --- 2,15 ---- /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ #endregion ! namespace MCSDoc.Framework { public interface IPropertyDoc Index: IRootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IRootDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IRootDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IRootDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IRootDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IRootDoc Index: IStructDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/IStructDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IStructDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- IStructDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,15 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ ! using Mono.CSharp; ! ! namespace MCSDoc { public interface IStructDoc : IContainerDoc --- 1,15 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion ! namespace MCSDoc.Framework { public interface IStructDoc : IContainerDoc Index: NamespaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/NamespaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NamespaceDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- NamespaceDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; - using Mono.CSharp; ! namespace MCSDoc { internal class NamespaceDoc : INamespaceDoc --- 1,18 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion using System; using System.Collections; ! namespace MCSDoc.Framework { internal class NamespaceDoc : INamespaceDoc Index: RootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework/RootDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RootDoc.cs 9 Nov 2004 08:47:21 -0000 1.1 --- RootDoc.cs 9 Nov 2004 08:56:40 -0000 1.2 *************** *** 1,17 **** /** * Project: Master C# Document Generator ! * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; - using Mono.CSharp; ! namespace MCSDoc { internal class RootDoc : IRootDoc --- 1,18 ---- + #region Copyright Notice /** * Project: Master C# Document Generator ! * Contact: $Author$ * Web: http://csdoc.sourceforge.net * * $Id$ ! * Copyright: (C) 2003, 2004 Gaurav Vaish * */ + #endregion using System; using System.Collections; ! namespace MCSDoc.Framework { internal class RootDoc : IRootDoc |
From: <mas...@us...> - 2004-11-09 08:47:59
|
Update of /cvsroot/csdoc/mcsdoc/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13073/docs Log Message: Directory /cvsroot/csdoc/mcsdoc/docs added to the repository |
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13006 Added Files: AccessFlags.cs AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IAttributeDoc.cs IClassDoc.cs IContainerDoc.cs IDelegateDoc.cs IEnumDoc.cs IFieldDoc.cs IInterfaceDoc.cs IMethodDoc.cs INamespaceDoc.cs IPropertyDoc.cs IRootDoc.cs IStructDoc.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Import from old mcsdoc --- NEW FILE: AccessFlags.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AccessFlags.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; using System; namespace MCSDoc { public enum AccessFlags { Public, Private, Protected, Internal, ProtectedInternal } } --- NEW FILE: AttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AttributeDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { internal class AttributeDoc : ClassDoc, IAttributeDoc { private AccessFlags flags; private AttributeTargets targets; public AttributeDoc(Class klass) : base(klass) { if(!base.IsAttribute) throw new Exception("[AttributeDoc] Class is not an attribute"); } public AccessFlags Flags { get { throw new NotImplementedException(); } } public AttributeTargets Targets { get { throw new NotImplementedException(); } } } } --- NEW FILE: ChangeLog --- $Id: ChangeLog,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Import from old mcsdoc 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AccessFlags.cs : Added enumeration. * AttributeDoc.cs : Missing ';'. * ClassDocList.cs : Typo fixed. It should implement IEnumerable * DocTreeGenerator.cs : ParseNamespaces() - Refer to interfaces. StructDoc/ClassDoc to IStructDoc/IClassDoc * IContainer.cs : IMemberDoc renamed to IFieldDoc * IEnumDoc.cs : Added interface for enum-doc. * IFieldDoc.cs : Added interface for class/struct fields-doc * IMethodDoc.cs : Added itnerface for method-doc. 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : NamespaceLookup(string) - Don't return evaluating the value. 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * **.cs : Moving from ../../mcs/MCSDoc directory to here. 2003-04-06 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Checking for exception and attribute. Ummm! Looks clumsy. Will rectify it later. 2003-04-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : ParseAndGenerate() - No need for multiple calls here itself. : GenerateTree() - Lot of work. * NamespaceDoc.cs : No need for subnamespaces. * ClassDoc.cs : Implements IComparable. Need while sorting the array. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * NamespaceDoc.cs : Name { get; } - Added, CreateHierarchy(ArrayList) - Init impl, IsNamespaceAdded(string, ArrayList), IsNamespaceAdded(string, NamespaceDoc), GetSubnames(string) - Added. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * INamespaceDoc.cs : Namespaces { get; } - Sub-namespaces. * DocTreeGenerator.cs : Parsing done. Generation to start. * NamespaceDoc.cs : CreateHierarchy(ArrayList) - Stubbed. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AttributeDoc.cs : Oops! Forgot to add last time. * RootDoc.cs : Don't parse here. * DocTreeGenerator.cs : Making it come to use. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Populated all. Will take a second look sometime later, especially for PopulateInners. Have to take of if class is an attribute. * AttributeDoc.cs : Initial implementation * ClassDoc.cs : Class { get; } - Added. : Accessibility - internal. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Parse() - Some impl. * RootDoc.cs : PopulateTypeContainers - Init Impl. * NamespaceDoc.cs : Initial implementation. * INamespaceDoc.cs : No Attributes to a namespace. Ok! * IAttributeDoc.cs, * IInterfaceDoc.cs, * IContainerDoc.cs : Name { get; } - Added. * IAttributeDoc.cs : Now derives from IContainerDoc 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Stubbed PopulateXXXX methods * DocTreeGenerator.cs : Looks like won't need it in future 2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementation. * ClassDoc.cs : Initial implementation. * DocTreeGenerator.cs : Going ahead and back and ahead. * IContainerDoc.cs : IContainerDoc made property. * IRootDoc.cs : Namespaces is INamespace[] 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : Stubbed RootDoc { get; } 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IAttributeDoc.cs, * IInterfaceDoc.cs : Added interfaces * ClassDoc.cs : Initial implementation * DocTreeGenerator.cs : Initial implementation 2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs : Don't use *List classes. * ClassDocList.cs : Will remove it later. * IContainerDoc.cs : Superinterfaces for IClassDoc, IStructDoc since both of them can hold all other types inside them. * IStructDoc.cs : Added interface. 2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs, * ClassDocList.cs : Trying to see what works best. Still not sure of what classes to have and what properties will they have. 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Removed * IRootDoc.cs : Added interface * ClassDocList.cs : List of IClassDoc 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementaion. --- NEW FILE: ClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class ClassDoc : IClassDoc, IComparable { private Class klass; private string name; private bool isException = false; private bool isAttribute = false; private IClassDoc baseClass = null; private IInterfaceDoc[] interfaces = null; private IContainerDoc container = null; public ClassDoc(Class klass) { this.klass = klass; // need to Set - BaseClass, Interfaces, Container throw new NotImplementedException(); } private void Parse() { /* ArrayList bases = klass.Bases; if(bases != null || bases.Count > 0) { // } */ if(klass.BaseType != null) { isAttribute = IsSubtypeOf(TypeManager.attribute_type); isException = IsSubtypeOf(TypeManager.exception_type); } } private bool IsSubtypeOf(Type type) { Type baseType = klass.BaseType; while(baseType != null && baseType.ToString() != type.ToString()) { if(baseType.IsSubclassOf(type)) return true; baseType = baseType.BaseType; } return false; } protected Class Class { get { return this.klass; } } public string NamespaceName { get { throw new NotImplementedException(); } } public string Comments { get { throw new NotImplementedException(); } } public AccessFlags AccessFlags { get { throw new NotImplementedException(); } } public string Name { get { return name; } } public bool IsContained { get { return this.container != null; } } public bool IsException { get { return isException; } } public bool IsAttribute { get { return isAttribute; } } public IClassDoc BaseClass { get { return baseClass; } } public IInterfaceDoc[] Interfaces { get { return interfaces; } } public IContainerDoc ContainerDoc { get { return this.container; } } public IAttributeDoc[] Attributes { get { throw new NotImplementedException(); } } public IMethodDoc[] Methods { get { throw new NotImplementedException(); } } public IPropertyDoc[] Properties { get { throw new NotImplementedException(); } } public IFieldDoc[] Fields { get { throw new NotImplementedException(); } } public IClassDoc[] InnerClasses { get { throw new NotImplementedException(); } } public IDelegateDoc[] InnerDelegates { get { throw new NotImplementedException(); } } public IEnumDoc[] InnerEnums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] InnerInterfaces { get { throw new NotImplementedException(); } } public IStructDoc[] InnerStructs { get { throw new NotImplementedException(); } } public int CompareTo(object obj) { if(obj is ClassDoc) { ClassDoc other = (ClassDoc) obj; string otherName = other.Name; if(other.NamespaceName == this.NamespaceName) { return (this.Name.CompareTo(other.Name)); } // I know this is wrong. return NamespaceName.CompareTo(other.NamespaceName); } throw new ArgumentException("[CompareTo] obj is not of" + " type ClassDoc"); } } } --- NEW FILE: ClassDocList.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDocList.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using Mono.CSharp; using System.Collections; namespace MCSDoc { public class ClassDocList : IEnumerable { private ArrayList classDocs = new ArrayList(); public ClassDocList() { } public ClassDocList(ArrayList classDocs) { if(classDocs != null) { foreach(object c in classDocs) { if(c is IClassDoc) Add((IClassDoc)c); } } } public IClassDoc this[int index] { get { if(index >= 0 && index < classDocs.Count) { return (IClassDoc)classDocs[index]; } throw new ArgumentException();//IndexOutOfRangeException(); } set { classDocs[index] = value; } } public int Count { get { return classDocs.Count; } } public void Add(IClassDoc classDoc) { classDocs.Add(classDoc); } public bool Contains(IClassDoc classDoc) { return classDocs.Contains(classDoc); } public IEnumerator GetEnumerator() { return classDocs.GetEnumerator(); } } } --- NEW FILE: DocTreeGenerator.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: DocTreeGenerator.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; using System.Collections; namespace MCSDoc { internal class DocTreeGenerator { private TypeContainer root = null; private RootDoc rootDoc = null; private ArrayList allNamespaces = new ArrayList(); private ArrayList allClasses = new ArrayList(); private ArrayList allStructs = new ArrayList(); private ArrayList allDelegates = new ArrayList(); private ArrayList allEnums = new ArrayList(); private ArrayList allInterfaces = new ArrayList(); public DocTreeGenerator(TypeContainer root) { if(root == null) { throw new ArgumentException("[DocTreeGenerator] Null root"); } this.root = root; //rootDoc = new RootDoc(root); ParseAndGenerate(); } private void ParseAndGenerate() { //rootDoc.Parse(root); //ParseContainers(root.Types); //ParseDelegates(root.Delegates); //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ParseContainer(root); //First need to populate [allNamespaces] //or should I populate while generating tree? ParseNamespaces(); GenerateTree(); } private void GenerateTree() { rootDoc = new RootDoc(); //Need to add ONLY namespaces and all types //that are not inside any namespace. //Namespaces will recursively contain all the //types that are within any namespace. //Now, I will go home today and work on the //exact logic for whole of this system! throw new NotImplementedException(); } private void ParseNamespaces() { foreach(IClassDoc cd in this.allClasses) { if(cd.NamespaceName != null) { OptNamespaceAdd(cd.NamespaceName); } } foreach(IStructDoc sd in this.allStructs) { if(sd.NamespaceName != null) { OptNamespaceAdd(sd.NamespaceName); } } foreach(IEnumDoc ed in this.allEnums) { /** if(ed.NamespaceEntry.FullName != null) { OptNamespaceAdd(ed.NamespaceName); } */ } foreach(IInterfaceDoc id in this.allInterfaces) { /** if(id.NamespaceEntry.FullName != null) { OptNamespaceAdd(id.NamespaceName); } */ } foreach(IDelegateDoc dd in this.allDelegates) { /** if(dd.NamespaceEntry.FullName != null) { OptNamespaceAdd(dd.NamespaceName); } */ } } private void OptNamespaceAdd(string name) { foreach(NamespaceDoc current in allNamespaces) { if(current.Name == name) { return; } } NamespaceDoc nsd = new NamespaceDoc(name); allNamespaces.Add(nsd); } private void HandleNamespaceClass(Class klass, IClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, IEnumDoc doc) { NamespaceDoc nsd = NamespaceLookup(eenum.NamespaceEntry.FullName); nsd.AddEnumDoc(doc); } private NamespaceDoc NamespaceLookup(string name) { throw new NotImplementedException(); } private void ParseContainers(ArrayList containers) { if(containers != null && containers.Count > 0) { foreach(TypeContainer tc in containers) { ParseContainer(tc); } } } private void ParseContainer(TypeContainer container) { if(container != null) { if(container is Class) { Class c = (Class) container; IClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] // c.BaseType.IsSubclassOf(typeof(System.Attribute)) // || c.BaseType.IsSubclassOf(typeof(MCSAssembly.typeof(System.Attribute)) if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } else { cd = new ClassDoc(c); } allClasses.Add(cd); } else if(container is Struct) { Struct s = (Struct) container; IStructDoc sd = null;//new IStructDoc(s); allStructs.Add(sd); } //Handle all inner types recursively ParseContainers(container.Types); ParseDelegates(container.Delegates); ParseEnums(container.Enums); ParseInterfaces(container.Interfaces); } } private void ParseDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { foreach(Mono.CSharp.Delegate deleg in delegates) { IDelegateDoc dd = null;//new DelegateDoc(deleg); allDelegates.Add(dd); } } } private void ParseEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { foreach(Mono.CSharp.Enum eenum in enums) { IEnumDoc ed = null;//new EnumDoc(eenum); allDelegates.Add(ed); } } } private void ParseInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { foreach(Interface interf in interfaces) { IInterfaceDoc id = null;//new InterfaceDoc(interf); allInterfaces.Add(id); } } } public IRootDoc RootDoc { get { return rootDoc; } } } } --- NEW FILE: IAttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IAttributeDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { public interface IAttributeDoc : IClassDoc { AccessFlags Flags { get; } AttributeTargets Targets { get; } } } --- NEW FILE: IClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IClassDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IClassDoc : IContainerDoc { bool IsException { get; } bool IsAttribute { get; } /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } /// <summary> /// Returns document elements for the /// implemented interfaces, if any. /// </summary> IInterfaceDoc[] Interfaces { get; } } } --- NEW FILE: IContainerDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IContainerDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IContainerDoc { string Comments { get; } string Name { get; } AccessFlags AccessFlags { get; } bool IsContained { get; } string NamespaceName { get; } // Returns non null only if(IsContained) // may throw an exception otherwise IContainerDoc ContainerDoc { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IFieldDoc[] Fields { get; } IClassDoc[] InnerClasses { get; } IDelegateDoc[] InnerDelegates { get; } IEnumDoc[] InnerEnums { get; } IInterfaceDoc[] InnerInterfaces { get; } IStructDoc[] InnerStructs { get; } } } --- NEW FILE: IDelegateDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IDelegateDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IDelegateDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClassDoc { get; } string NamespaceName { get; } // Need to get documentation // for the signature } } --- NEW FILE: IEnumDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IEnumDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IEnumDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } string NamespaceName { get; } // Need to get documentation // for each member also } } --- NEW FILE: IFieldDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IFieldDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IFieldDoc { //Documentation for the field } } --- NEW FILE: IInterfaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IInterfaceDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IInterfaceDoc { string Comments { get; } string Name { get; } AccessFlags Flags { get; } string NamespaceName { get; } IInterfaceDoc BaseInterface { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IFieldDoc[] Fields { get; } IInterfaceDoc[] BaseInterfaces { get; } } } --- NEW FILE: IMethodDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IMethodDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IMethodDoc { //Documentation for the method } } --- NEW FILE: INamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: INamespaceDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface INamespaceDoc { string Comments { get; } string Name { get; } INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IPropertyDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IPropertyDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IPropertyDoc { //Documentation for the property } } --- NEW FILE: IRootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IRootDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IRootDoc { INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IStructDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IStructDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IStructDoc : IContainerDoc { } } --- NEW FILE: NamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: NamespaceDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class NamespaceDoc : INamespaceDoc { private string comments; private string name; ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); ArrayList delegates = new ArrayList(); ArrayList enums = new ArrayList(); ArrayList interfaces = new ArrayList(); public NamespaceDoc(string name) { this.name = name; } public NamespaceDoc(string name, string filename) : this(name) { throw new NotImplementedException(); } /// <summary> /// Will create a hierarchy of NamespaceDoc elements. /// </summary> /// <remarks> /// btw, do I really need this scrap funda of Parent namespace /// and sub-namespaces? /// </remarks> public static ArrayList CreateHierarchy(ArrayList namespaces) { ArrayList retVal = new ArrayList(); string name; string[] subNames; if(namespaces != null && namespaces.Count > 0) { foreach(NamespaceDoc nd in namespaces) { name = nd.Name; bool isAdded = IsNamespaceAdded(name, retVal); /* if(!isAdded) { subNames = GetSubnames(name); if(subNames != null) { foreach(string subName in subNames) { isAdded &= IsNamespaceAdded(subName, retVal); if(isAdded) break; } } } */ AddNamespaceInHierarchy(nd, retVal); throw new NotImplementedException(); } throw new NotImplementedException(); } throw new NotImplementedException(); } private static void AddNamespaceInHierarchy(NamespaceDoc doc, ArrayList docList) { throw new NotImplementedException(); } private static bool IsNamespaceAdded(string name, ArrayList namespaces) { foreach(NamespaceDoc nsd in namespaces) { if(IsNamespaceAdded(name, nsd)) { return true; } } return false; } private static bool IsNamespaceAdded(string name, NamespaceDoc doc) { throw new NotImplementedException(); } private static string[] GetSubnames(string name) { int dotCount = 0; foreach(char c in name) { if(c == '.') dotCount++; } if(dotCount == 0) return null; int[] dotIndices = new int[dotCount]; int cIndex = 0; int cPos = 0; for(cPos = 0; cPos < name.Length; cPos++) { if(name[cPos] == '.') { dotIndices[cIndex] = cPos; cIndex++; } } string[] retVal = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { retVal[cIndex] = name.Substring(0, dotIndices[cIndex] - 1); } return retVal; } public void AddClassDoc(IClassDoc doc) { classes.Add(doc); } public void AddStructDoc(IStructDoc doc) { structs.Add(doc); } public void AddDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } public void AddEnumDoc(IEnumDoc doc) { enums.Add(doc); } public void AddInterfaceDoc(IInterfaceDoc doc) { interfaces.Add(doc); } public string Name { get { return this.name; } } public string Comments { get { return comments; } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { return (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } } public IDelegateDoc[] Delegates { get { return (IDelegateDoc[]) delegates.ToArray(typeof(IDelegateDoc)); } } public IEnumDoc[] Enums { get { return (IEnumDoc[]) enums.ToArray(typeof(IEnumDoc)); } } public IInterfaceDoc[] Interfaces { get { return (IInterfaceDoc[]) interfaces.ToArray(typeof(IInterfaceDoc)); } } public IStructDoc[] Structs { get { return (IStructDoc[]) interfaces.ToArray(typeof(IStructDoc)); } } } } --- NEW FILE: RootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: RootDoc.cs,v 1.1 2004/11/09 08:47:21 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class RootDoc : IRootDoc { INamespaceDoc[] namespaces = null; IClassDoc[] classes = null; IStructDoc[] structs = null; IDelegateDoc[] delegates = null; IEnumDoc[] enums = null; IInterfaceDoc[] interfaces = null; ArrayList namespaceList = new ArrayList(); public RootDoc(TypeContainer root) { //Parse(root); } public RootDoc() { //Do nothing! } private void Parse(TypeContainer root) { PopulateContainers(root.Types); throw new NotImplementedException(); } private void PopulateNamespaces() { if(namespaceList.Count > 0) { //namespaces = (INamespaceDoc[]) namespaceList.ToArray(typeof(INamespaceDoc)); } } private void PopulateContainers(ArrayList containers) { if(containers != null || containers.Count > 0) { ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); foreach(TypeContainer tc in containers) { if(tc is Class) { Class c = (Class)tc; ClassDoc cd = null; if(c.BaseType != null) { if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } } else { cd = new ClassDoc(c); } if(c.NamespaceEntry != null && c.NamespaceEntry.FullName.Length > 0) { HandleNamespaceClass(c, cd); } // process ClassDoc classes.Add(cd); } else if(tc is Struct) { Struct s = (Struct)tc; IStructDoc sd = null;//new StructDoc(s); if(s.NamespaceEntry != null && s.NamespaceEntry.FullName.Length > 0) { HandleNamespaceStruct(s, sd); } // process StructDoc structs.Add(sd); } PopulateInners(tc.Types); } if(classes.Count > 0) { this.classes = (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } if(structs.Count > 0) { this.structs = (IStructDoc[]) classes.ToArray(typeof(IStructDoc)); } } } private NamespaceDoc NamespaceLookup(string name) { NamespaceDoc retVal = null; foreach(NamespaceDoc current in namespaceList) { if(current.Name == name) { retVal = current; break; } } if(retVal == null) { retVal = new NamespaceDoc(name); namespaceList.Add(retVal); } return retVal; } private void HandleNamespaceClass(Class klass, ClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void PopulateInners(ArrayList types) { throw new NotImplementedException(); } private void PopulateEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { ArrayList enumDocs = new ArrayList(); IEnumDoc doc = null; foreach(Mono.CSharp.Enum current in enums) { doc = null;//new EnumDoc(current); enumDocs.Add(doc); } if(enumDocs.Count > 0) { this.enums = (IEnumDoc[]) enumDocs.ToArray(typeof(IEnumDoc)); } } } private void PopulateDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { ArrayList delegateDocs = new ArrayList(); IDelegateDoc doc = null; foreach(Mono.CSharp.Delegate current in delegates) { doc = null;//new DelegateDoc(current); delegateDocs.Add(doc); } if(delegateDocs.Count > 0) { this.delegates = (IDelegateDoc[]) delegateDocs.ToArray(typeof(IDelegateDoc)); } } } private void PopulateInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { ArrayList interfaceDocs = new ArrayList(); IInterfaceDoc doc = null; foreach(Interface current in interfaces) { doc = null;//new InterfaceDoc(current); interfaceDocs.Add(doc); } if(interfaceDocs.Count > 0) { this.interfaces = (IInterfaceDoc[]) interfaceDocs.ToArray(typeof(IInterfaceDoc)); } } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { throw new NotImplementedException(); } } public IDelegateDoc[] Delegates { get { throw new NotImplementedException(); } } public IEnumDoc[] Enums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] Interfaces { get { throw new NotImplementedException(); } } public IStructDoc[] Structs { get { throw new NotImplementedException(); } } } } |
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12868 Removed Files: AccessFlags.cs AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IAttributeDoc.cs IClassDoc.cs IContainerDoc.cs IDelegateDoc.cs IEnumDoc.cs IFieldDoc.cs IInterfaceDoc.cs IMethodDoc.cs INamespaceDoc.cs IPropertyDoc.cs IRootDoc.cs IStructDoc.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Moved for MCSDoc.Framework --- AccessFlags.cs DELETED --- --- AttributeDoc.cs DELETED --- --- ChangeLog DELETED --- --- ClassDoc.cs DELETED --- --- ClassDocList.cs DELETED --- --- DocTreeGenerator.cs DELETED --- --- IAttributeDoc.cs DELETED --- --- IClassDoc.cs DELETED --- --- IContainerDoc.cs DELETED --- --- IDelegateDoc.cs DELETED --- --- IEnumDoc.cs DELETED --- --- IFieldDoc.cs DELETED --- --- IInterfaceDoc.cs DELETED --- --- IMethodDoc.cs DELETED --- --- INamespaceDoc.cs DELETED --- --- IPropertyDoc.cs DELETED --- --- IRootDoc.cs DELETED --- --- IStructDoc.cs DELETED --- --- NamespaceDoc.cs DELETED --- --- RootDoc.cs DELETED --- |
From: <mas...@us...> - 2004-11-09 08:45:47
|
Update of /cvsroot/csdoc/mcsdoc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12749 Modified Files: ChangeLog Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * MCSDoc : Renamed to MCSDoc.Framework * MSDoc : The folder will contain code for the executable. * MSDoc.Framework : The MCSDoc Framework Library. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 9 Nov 2004 08:39:32 -0000 1.2 --- ChangeLog 9 Nov 2004 08:45:39 -0000 1.3 *************** *** 3,6 **** --- 3,12 ---- 2004-11-09 Gaurav Vaish <mastergaurav> + * MCSDoc : Renamed to MCSDoc.Framework + * MSDoc : The folder will contain code for the executable. + * MSDoc.Framework : The MCSDoc Framework Library. + + 2004-11-09 Gaurav Vaish <mastergaurav> + * MCSDoc : Imported the directory from old csdoc. * Makefile : Dummy makefile for now. To use NAnt finally. |
From: <mas...@us...> - 2004-11-09 08:45:30
|
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12725/MCSDoc.Framework Log Message: Directory /cvsroot/csdoc/mcsdoc/src/MCSDoc.Framework added to the repository |
From: <mas...@us...> - 2004-11-09 08:44:04
|
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12489/MCSDoc.Core Log Message: Directory /cvsroot/csdoc/mcsdoc/src/MCSDoc.Core added to the repository |
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11972 Added Files: AccessFlags.cs AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IAttributeDoc.cs IClassDoc.cs IContainerDoc.cs IDelegateDoc.cs IEnumDoc.cs IFieldDoc.cs IInterfaceDoc.cs IMethodDoc.cs INamespaceDoc.cs IPropertyDoc.cs IRootDoc.cs IStructDoc.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Import from old mcsdoc --- NEW FILE: AccessFlags.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AccessFlags.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; using System; namespace MCSDoc { public enum AccessFlags { Public, Private, Protected, Internal, ProtectedInternal } } --- NEW FILE: AttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AttributeDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { internal class AttributeDoc : ClassDoc, IAttributeDoc { private AccessFlags flags; private AttributeTargets targets; public AttributeDoc(Class klass) : base(klass) { if(!base.IsAttribute) throw new Exception("[AttributeDoc] Class is not an attribute"); } public AccessFlags Flags { get { throw new NotImplementedException(); } } public AttributeTargets Targets { get { throw new NotImplementedException(); } } } } --- NEW FILE: ChangeLog --- $Id: ChangeLog,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ 2004-11-09 Gaurav Vaish <mastergaurav> * *.cs : Import from old mcsdoc 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AccessFlags.cs : Added enumeration. * AttributeDoc.cs : Missing ';'. * ClassDocList.cs : Typo fixed. It should implement IEnumerable * DocTreeGenerator.cs : ParseNamespaces() - Refer to interfaces. StructDoc/ClassDoc to IStructDoc/IClassDoc * IContainer.cs : IMemberDoc renamed to IFieldDoc * IEnumDoc.cs : Added interface for enum-doc. * IFieldDoc.cs : Added interface for class/struct fields-doc * IMethodDoc.cs : Added itnerface for method-doc. 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : NamespaceLookup(string) - Don't return evaluating the value. 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * **.cs : Moving from ../../mcs/MCSDoc directory to here. 2003-04-06 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Checking for exception and attribute. Ummm! Looks clumsy. Will rectify it later. 2003-04-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : ParseAndGenerate() - No need for multiple calls here itself. : GenerateTree() - Lot of work. * NamespaceDoc.cs : No need for subnamespaces. * ClassDoc.cs : Implements IComparable. Need while sorting the array. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * NamespaceDoc.cs : Name { get; } - Added, CreateHierarchy(ArrayList) - Init impl, IsNamespaceAdded(string, ArrayList), IsNamespaceAdded(string, NamespaceDoc), GetSubnames(string) - Added. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * INamespaceDoc.cs : Namespaces { get; } - Sub-namespaces. * DocTreeGenerator.cs : Parsing done. Generation to start. * NamespaceDoc.cs : CreateHierarchy(ArrayList) - Stubbed. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AttributeDoc.cs : Oops! Forgot to add last time. * RootDoc.cs : Don't parse here. * DocTreeGenerator.cs : Making it come to use. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Populated all. Will take a second look sometime later, especially for PopulateInners. Have to take of if class is an attribute. * AttributeDoc.cs : Initial implementation * ClassDoc.cs : Class { get; } - Added. : Accessibility - internal. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Parse() - Some impl. * RootDoc.cs : PopulateTypeContainers - Init Impl. * NamespaceDoc.cs : Initial implementation. * INamespaceDoc.cs : No Attributes to a namespace. Ok! * IAttributeDoc.cs, * IInterfaceDoc.cs, * IContainerDoc.cs : Name { get; } - Added. * IAttributeDoc.cs : Now derives from IContainerDoc 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Stubbed PopulateXXXX methods * DocTreeGenerator.cs : Looks like won't need it in future 2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementation. * ClassDoc.cs : Initial implementation. * DocTreeGenerator.cs : Going ahead and back and ahead. * IContainerDoc.cs : IContainerDoc made property. * IRootDoc.cs : Namespaces is INamespace[] 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : Stubbed RootDoc { get; } 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IAttributeDoc.cs, * IInterfaceDoc.cs : Added interfaces * ClassDoc.cs : Initial implementation * DocTreeGenerator.cs : Initial implementation 2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs : Don't use *List classes. * ClassDocList.cs : Will remove it later. * IContainerDoc.cs : Superinterfaces for IClassDoc, IStructDoc since both of them can hold all other types inside them. * IStructDoc.cs : Added interface. 2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs, * ClassDocList.cs : Trying to see what works best. Still not sure of what classes to have and what properties will they have. 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Removed * IRootDoc.cs : Added interface * ClassDocList.cs : List of IClassDoc 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementaion. --- NEW FILE: ClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class ClassDoc : IClassDoc, IComparable { private Class klass; private string name; private bool isException = false; private bool isAttribute = false; private IClassDoc baseClass = null; private IInterfaceDoc[] interfaces = null; private IContainerDoc container = null; public ClassDoc(Class klass) { this.klass = klass; // need to Set - BaseClass, Interfaces, Container throw new NotImplementedException(); } private void Parse() { /* ArrayList bases = klass.Bases; if(bases != null || bases.Count > 0) { // } */ if(klass.BaseType != null) { isAttribute = IsSubtypeOf(TypeManager.attribute_type); isException = IsSubtypeOf(TypeManager.exception_type); } } private bool IsSubtypeOf(Type type) { Type baseType = klass.BaseType; while(baseType != null && baseType.ToString() != type.ToString()) { if(baseType.IsSubclassOf(type)) return true; baseType = baseType.BaseType; } return false; } protected Class Class { get { return this.klass; } } public string NamespaceName { get { throw new NotImplementedException(); } } public string Comments { get { throw new NotImplementedException(); } } public AccessFlags AccessFlags { get { throw new NotImplementedException(); } } public string Name { get { return name; } } public bool IsContained { get { return this.container != null; } } public bool IsException { get { return isException; } } public bool IsAttribute { get { return isAttribute; } } public IClassDoc BaseClass { get { return baseClass; } } public IInterfaceDoc[] Interfaces { get { return interfaces; } } public IContainerDoc ContainerDoc { get { return this.container; } } public IAttributeDoc[] Attributes { get { throw new NotImplementedException(); } } public IMethodDoc[] Methods { get { throw new NotImplementedException(); } } public IPropertyDoc[] Properties { get { throw new NotImplementedException(); } } public IFieldDoc[] Fields { get { throw new NotImplementedException(); } } public IClassDoc[] InnerClasses { get { throw new NotImplementedException(); } } public IDelegateDoc[] InnerDelegates { get { throw new NotImplementedException(); } } public IEnumDoc[] InnerEnums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] InnerInterfaces { get { throw new NotImplementedException(); } } public IStructDoc[] InnerStructs { get { throw new NotImplementedException(); } } public int CompareTo(object obj) { if(obj is ClassDoc) { ClassDoc other = (ClassDoc) obj; string otherName = other.Name; if(other.NamespaceName == this.NamespaceName) { return (this.Name.CompareTo(other.Name)); } // I know this is wrong. return NamespaceName.CompareTo(other.NamespaceName); } throw new ArgumentException("[CompareTo] obj is not of" + " type ClassDoc"); } } } --- NEW FILE: ClassDocList.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDocList.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using Mono.CSharp; using System.Collections; namespace MCSDoc { public class ClassDocList : IEnumerable { private ArrayList classDocs = new ArrayList(); public ClassDocList() { } public ClassDocList(ArrayList classDocs) { if(classDocs != null) { foreach(object c in classDocs) { if(c is IClassDoc) Add((IClassDoc)c); } } } public IClassDoc this[int index] { get { if(index >= 0 && index < classDocs.Count) { return (IClassDoc)classDocs[index]; } throw new ArgumentException();//IndexOutOfRangeException(); } set { classDocs[index] = value; } } public int Count { get { return classDocs.Count; } } public void Add(IClassDoc classDoc) { classDocs.Add(classDoc); } public bool Contains(IClassDoc classDoc) { return classDocs.Contains(classDoc); } public IEnumerator GetEnumerator() { return classDocs.GetEnumerator(); } } } --- NEW FILE: DocTreeGenerator.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: DocTreeGenerator.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; using System.Collections; namespace MCSDoc { internal class DocTreeGenerator { private TypeContainer root = null; private RootDoc rootDoc = null; private ArrayList allNamespaces = new ArrayList(); private ArrayList allClasses = new ArrayList(); private ArrayList allStructs = new ArrayList(); private ArrayList allDelegates = new ArrayList(); private ArrayList allEnums = new ArrayList(); private ArrayList allInterfaces = new ArrayList(); public DocTreeGenerator(TypeContainer root) { if(root == null) { throw new ArgumentException("[DocTreeGenerator] Null root"); } this.root = root; //rootDoc = new RootDoc(root); ParseAndGenerate(); } private void ParseAndGenerate() { //rootDoc.Parse(root); //ParseContainers(root.Types); //ParseDelegates(root.Delegates); //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ParseContainer(root); //First need to populate [allNamespaces] //or should I populate while generating tree? ParseNamespaces(); GenerateTree(); } private void GenerateTree() { rootDoc = new RootDoc(); //Need to add ONLY namespaces and all types //that are not inside any namespace. //Namespaces will recursively contain all the //types that are within any namespace. //Now, I will go home today and work on the //exact logic for whole of this system! throw new NotImplementedException(); } private void ParseNamespaces() { foreach(IClassDoc cd in this.allClasses) { if(cd.NamespaceName != null) { OptNamespaceAdd(cd.NamespaceName); } } foreach(IStructDoc sd in this.allStructs) { if(sd.NamespaceName != null) { OptNamespaceAdd(sd.NamespaceName); } } foreach(IEnumDoc ed in this.allEnums) { /** if(ed.NamespaceEntry.FullName != null) { OptNamespaceAdd(ed.NamespaceName); } */ } foreach(IInterfaceDoc id in this.allInterfaces) { /** if(id.NamespaceEntry.FullName != null) { OptNamespaceAdd(id.NamespaceName); } */ } foreach(IDelegateDoc dd in this.allDelegates) { /** if(dd.NamespaceEntry.FullName != null) { OptNamespaceAdd(dd.NamespaceName); } */ } } private void OptNamespaceAdd(string name) { foreach(NamespaceDoc current in allNamespaces) { if(current.Name == name) { return; } } NamespaceDoc nsd = new NamespaceDoc(name); allNamespaces.Add(nsd); } private void HandleNamespaceClass(Class klass, IClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, IEnumDoc doc) { NamespaceDoc nsd = NamespaceLookup(eenum.NamespaceEntry.FullName); nsd.AddEnumDoc(doc); } private NamespaceDoc NamespaceLookup(string name) { throw new NotImplementedException(); } private void ParseContainers(ArrayList containers) { if(containers != null && containers.Count > 0) { foreach(TypeContainer tc in containers) { ParseContainer(tc); } } } private void ParseContainer(TypeContainer container) { if(container != null) { if(container is Class) { Class c = (Class) container; IClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] // c.BaseType.IsSubclassOf(typeof(System.Attribute)) // || c.BaseType.IsSubclassOf(typeof(MCSAssembly.typeof(System.Attribute)) if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } else { cd = new ClassDoc(c); } allClasses.Add(cd); } else if(container is Struct) { Struct s = (Struct) container; IStructDoc sd = null;//new IStructDoc(s); allStructs.Add(sd); } //Handle all inner types recursively ParseContainers(container.Types); ParseDelegates(container.Delegates); ParseEnums(container.Enums); ParseInterfaces(container.Interfaces); } } private void ParseDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { foreach(Mono.CSharp.Delegate deleg in delegates) { IDelegateDoc dd = null;//new DelegateDoc(deleg); allDelegates.Add(dd); } } } private void ParseEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { foreach(Mono.CSharp.Enum eenum in enums) { IEnumDoc ed = null;//new EnumDoc(eenum); allDelegates.Add(ed); } } } private void ParseInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { foreach(Interface interf in interfaces) { IInterfaceDoc id = null;//new InterfaceDoc(interf); allInterfaces.Add(id); } } } public IRootDoc RootDoc { get { return rootDoc; } } } } --- NEW FILE: IAttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IAttributeDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { public interface IAttributeDoc : IClassDoc { AccessFlags Flags { get; } AttributeTargets Targets { get; } } } --- NEW FILE: IClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IClassDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IClassDoc : IContainerDoc { bool IsException { get; } bool IsAttribute { get; } /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } /// <summary> /// Returns document elements for the /// implemented interfaces, if any. /// </summary> IInterfaceDoc[] Interfaces { get; } } } --- NEW FILE: IContainerDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IContainerDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IContainerDoc { string Comments { get; } string Name { get; } AccessFlags AccessFlags { get; } bool IsContained { get; } string NamespaceName { get; } // Returns non null only if(IsContained) // may throw an exception otherwise IContainerDoc ContainerDoc { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IFieldDoc[] Fields { get; } IClassDoc[] InnerClasses { get; } IDelegateDoc[] InnerDelegates { get; } IEnumDoc[] InnerEnums { get; } IInterfaceDoc[] InnerInterfaces { get; } IStructDoc[] InnerStructs { get; } } } --- NEW FILE: IDelegateDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IDelegateDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IDelegateDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClassDoc { get; } string NamespaceName { get; } // Need to get documentation // for the signature } } --- NEW FILE: IEnumDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IEnumDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IEnumDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } string NamespaceName { get; } // Need to get documentation // for each member also } } --- NEW FILE: IFieldDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IFieldDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IFieldDoc { //Documentation for the field } } --- NEW FILE: IInterfaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IInterfaceDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IInterfaceDoc { string Comments { get; } string Name { get; } AccessFlags Flags { get; } string NamespaceName { get; } IInterfaceDoc BaseInterface { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IFieldDoc[] Fields { get; } IInterfaceDoc[] BaseInterfaces { get; } } } --- NEW FILE: IMethodDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IMethodDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IMethodDoc { //Documentation for the method } } --- NEW FILE: INamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: INamespaceDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface INamespaceDoc { string Comments { get; } string Name { get; } INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IPropertyDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IPropertyDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IPropertyDoc { //Documentation for the property } } --- NEW FILE: IRootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IRootDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IRootDoc { INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IStructDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IStructDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IStructDoc : IContainerDoc { } } --- NEW FILE: NamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: NamespaceDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class NamespaceDoc : INamespaceDoc { private string comments; private string name; ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); ArrayList delegates = new ArrayList(); ArrayList enums = new ArrayList(); ArrayList interfaces = new ArrayList(); public NamespaceDoc(string name) { this.name = name; } public NamespaceDoc(string name, string filename) : this(name) { throw new NotImplementedException(); } /// <summary> /// Will create a hierarchy of NamespaceDoc elements. /// </summary> /// <remarks> /// btw, do I really need this scrap funda of Parent namespace /// and sub-namespaces? /// </remarks> public static ArrayList CreateHierarchy(ArrayList namespaces) { ArrayList retVal = new ArrayList(); string name; string[] subNames; if(namespaces != null && namespaces.Count > 0) { foreach(NamespaceDoc nd in namespaces) { name = nd.Name; bool isAdded = IsNamespaceAdded(name, retVal); /* if(!isAdded) { subNames = GetSubnames(name); if(subNames != null) { foreach(string subName in subNames) { isAdded &= IsNamespaceAdded(subName, retVal); if(isAdded) break; } } } */ AddNamespaceInHierarchy(nd, retVal); throw new NotImplementedException(); } throw new NotImplementedException(); } throw new NotImplementedException(); } private static void AddNamespaceInHierarchy(NamespaceDoc doc, ArrayList docList) { throw new NotImplementedException(); } private static bool IsNamespaceAdded(string name, ArrayList namespaces) { foreach(NamespaceDoc nsd in namespaces) { if(IsNamespaceAdded(name, nsd)) { return true; } } return false; } private static bool IsNamespaceAdded(string name, NamespaceDoc doc) { throw new NotImplementedException(); } private static string[] GetSubnames(string name) { int dotCount = 0; foreach(char c in name) { if(c == '.') dotCount++; } if(dotCount == 0) return null; int[] dotIndices = new int[dotCount]; int cIndex = 0; int cPos = 0; for(cPos = 0; cPos < name.Length; cPos++) { if(name[cPos] == '.') { dotIndices[cIndex] = cPos; cIndex++; } } string[] retVal = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { retVal[cIndex] = name.Substring(0, dotIndices[cIndex] - 1); } return retVal; } public void AddClassDoc(IClassDoc doc) { classes.Add(doc); } public void AddStructDoc(IStructDoc doc) { structs.Add(doc); } public void AddDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } public void AddEnumDoc(IEnumDoc doc) { enums.Add(doc); } public void AddInterfaceDoc(IInterfaceDoc doc) { interfaces.Add(doc); } public string Name { get { return this.name; } } public string Comments { get { return comments; } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { return (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } } public IDelegateDoc[] Delegates { get { return (IDelegateDoc[]) delegates.ToArray(typeof(IDelegateDoc)); } } public IEnumDoc[] Enums { get { return (IEnumDoc[]) enums.ToArray(typeof(IEnumDoc)); } } public IInterfaceDoc[] Interfaces { get { return (IInterfaceDoc[]) interfaces.ToArray(typeof(IInterfaceDoc)); } } public IStructDoc[] Structs { get { return (IStructDoc[]) interfaces.ToArray(typeof(IStructDoc)); } } } } --- NEW FILE: RootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: RootDoc.cs,v 1.1 2004/11/09 08:40:05 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class RootDoc : IRootDoc { INamespaceDoc[] namespaces = null; IClassDoc[] classes = null; IStructDoc[] structs = null; IDelegateDoc[] delegates = null; IEnumDoc[] enums = null; IInterfaceDoc[] interfaces = null; ArrayList namespaceList = new ArrayList(); public RootDoc(TypeContainer root) { //Parse(root); } public RootDoc() { //Do nothing! } private void Parse(TypeContainer root) { PopulateContainers(root.Types); throw new NotImplementedException(); } private void PopulateNamespaces() { if(namespaceList.Count > 0) { //namespaces = (INamespaceDoc[]) namespaceList.ToArray(typeof(INamespaceDoc)); } } private void PopulateContainers(ArrayList containers) { if(containers != null || containers.Count > 0) { ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); foreach(TypeContainer tc in containers) { if(tc is Class) { Class c = (Class)tc; ClassDoc cd = null; if(c.BaseType != null) { if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } } else { cd = new ClassDoc(c); } if(c.NamespaceEntry != null && c.NamespaceEntry.FullName.Length > 0) { HandleNamespaceClass(c, cd); } // process ClassDoc classes.Add(cd); } else if(tc is Struct) { Struct s = (Struct)tc; IStructDoc sd = null;//new StructDoc(s); if(s.NamespaceEntry != null && s.NamespaceEntry.FullName.Length > 0) { HandleNamespaceStruct(s, sd); } // process StructDoc structs.Add(sd); } PopulateInners(tc.Types); } if(classes.Count > 0) { this.classes = (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } if(structs.Count > 0) { this.structs = (IStructDoc[]) classes.ToArray(typeof(IStructDoc)); } } } private NamespaceDoc NamespaceLookup(string name) { NamespaceDoc retVal = null; foreach(NamespaceDoc current in namespaceList) { if(current.Name == name) { retVal = current; break; } } if(retVal == null) { retVal = new NamespaceDoc(name); namespaceList.Add(retVal); } return retVal; } private void HandleNamespaceClass(Class klass, ClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void PopulateInners(ArrayList types) { throw new NotImplementedException(); } private void PopulateEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { ArrayList enumDocs = new ArrayList(); IEnumDoc doc = null; foreach(Mono.CSharp.Enum current in enums) { doc = null;//new EnumDoc(current); enumDocs.Add(doc); } if(enumDocs.Count > 0) { this.enums = (IEnumDoc[]) enumDocs.ToArray(typeof(IEnumDoc)); } } } private void PopulateDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { ArrayList delegateDocs = new ArrayList(); IDelegateDoc doc = null; foreach(Mono.CSharp.Delegate current in delegates) { doc = null;//new DelegateDoc(current); delegateDocs.Add(doc); } if(delegateDocs.Count > 0) { this.delegates = (IDelegateDoc[]) delegateDocs.ToArray(typeof(IDelegateDoc)); } } } private void PopulateInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { ArrayList interfaceDocs = new ArrayList(); IInterfaceDoc doc = null; foreach(Interface current in interfaces) { doc = null;//new InterfaceDoc(current); interfaceDocs.Add(doc); } if(interfaceDocs.Count > 0) { this.interfaces = (IInterfaceDoc[]) interfaceDocs.ToArray(typeof(IInterfaceDoc)); } } } public INamespaceDoc[] Namespaces { get { throw new NotImplementedException(); } } public IClassDoc[] Classes { get { throw new NotImplementedException(); } } public IDelegateDoc[] Delegates { get { throw new NotImplementedException(); } } public IEnumDoc[] Enums { get { throw new NotImplementedException(); } } public IInterfaceDoc[] Interfaces { get { throw new NotImplementedException(); } } public IStructDoc[] Structs { get { throw new NotImplementedException(); } } } } |
From: <mas...@us...> - 2004-11-09 08:39:41
|
Update of /cvsroot/csdoc/mcsdoc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11850 Modified Files: ChangeLog Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * MCSDoc : Imported the directory from old csdoc. * Makefile : Dummy makefile for now. To use NAnt finally. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/mcsdoc/src/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 9 Nov 2004 08:38:15 -0000 1.1 --- ChangeLog 9 Nov 2004 08:39:32 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + $Id$ 2004-11-09 Gaurav Vaish <mastergaurav> |
From: <mas...@us...> - 2004-11-09 08:38:23
|
Update of /cvsroot/csdoc/mcsdoc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11554 Added Files: ChangeLog Makefile README Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * MCSDoc : Imported the directory from old csdoc. * Makefile : Dummy makefile for now. To use NAnt finally. --- NEW FILE: ChangeLog --- 2004-11-09 Gaurav Vaish <mastergaurav> * MCSDoc : Imported the directory from old csdoc. * Makefile : Dummy makefile for now. To use NAnt finally. --- NEW FILE: Makefile --- DIRS=mcsdoc ASSEMBLY=mcsdoc.dll all: default default: echo Nothing built clean: echo Nothing cleaned --- NEW FILE: README --- mcsdoc: The Master C# Document Generator. Hacked version of mcs (by Gaurav Vaish) |
From: <mas...@us...> - 2004-11-09 08:38:09
|
Update of /cvsroot/csdoc/mcsdoc/src/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11428/MCSDoc Log Message: Directory /cvsroot/csdoc/mcsdoc/src/MCSDoc added to the repository |
From: <mas...@us...> - 2004-11-09 08:36:04
|
Update of /cvsroot/csdoc/mcsdoc/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10936/tests Log Message: Directory /cvsroot/csdoc/mcsdoc/tests added to the repository |
From: <mas...@us...> - 2004-11-09 08:35:58
|
Update of /cvsroot/csdoc/mcsdoc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10889/src Log Message: Directory /cvsroot/csdoc/mcsdoc/src added to the repository |
From: <mas...@us...> - 2004-11-09 08:35:32
|
Update of /cvsroot/csdoc/mcsdoc/mono-mcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10803/mono-mcs Log Message: Directory /cvsroot/csdoc/mcsdoc/mono-mcs added to the repository |
From: <mas...@us...> - 2004-11-09 08:35:03
|
Update of /cvsroot/csdoc/mcsdoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10689 Added Files: AUTHORS ChangeLog IDEAS Log Message: 2004-11-09 Gaurav Vaish <mastergaurav> * mono-mcs : Hacked version of mcs (from Mono). * src : All code for library framework. * tests : Tests for the library. * AUTHORS : Authors to the various parts. * IDEAS : An introduction to the MCSDoc Idea(s). --- NEW FILE: AUTHORS --- * mcsdoc: Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * C# port of jay: Miguel * mcs: Mono Team * Special Thanks: Paolo Molaro <lupus AT ximian DOT com> --- NEW FILE: ChangeLog --- $Id: ChangeLog,v 1.1 2004/11/09 08:34:54 mastergaurav Exp $ 2004-11-09 Gaurav Vaish <mastergaurav> * mono-mcs : Hacked version of mcs (from Mono). * src : All code for library framework. * tests : Tests for the library. * AUTHORS : Authors to the various parts. * IDEAS : An introduction to the MCSDoc Idea(s). --- NEW FILE: IDEAS --- * mcsdoc * unidoc -> unidoc plugins |
From: <mas...@us...> - 2004-10-30 16:04:55
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv730 Modified Files: AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IContainerDoc.cs IInterfaceDoc.cs NamespaceDoc.cs RootDoc.cs Added Files: AccessFlags.cs IDelegateDoc.cs IEnumDoc.cs IFieldDoc.cs IMethodDoc.cs IPropertyDoc.cs Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AccessFlags.cs : Added enumeration. * AttributeDoc.cs : Missing ';'. * ClassDocList.cs : Typo fixed. It should implement IEnumerable * DocTreeGenerator.cs : ParseNamespaces() - Refer to interfaces. StructDoc/ClassDoc to IStructDoc/IClassDoc * IContainer.cs : IMemberDoc renamed to IFieldDoc * IEnumDoc.cs : Added interface for enum-doc. * IFieldDoc.cs : Added interface for class/struct fields-doc * IMethodDoc.cs : Added itnerface for method-doc. --- NEW FILE: AccessFlags.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AccessFlags.cs,v 1.1 2004/10/30 16:04:42 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; using System; namespace MCSDoc { public enum AccessFlags { Public, Private, Protected, Internal, ProtectedInternal } } --- NEW FILE: IDelegateDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IDelegateDoc.cs,v 1.1 2004/10/30 16:04:43 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IDelegateDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClassDoc { get; } string NamespaceName { get; } // Need to get documentation // for the signature } } --- NEW FILE: IEnumDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IEnumDoc.cs,v 1.1 2004/10/30 16:04:43 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IEnumDoc { /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } string NamespaceName { get; } // Need to get documentation // for each member also } } --- NEW FILE: IFieldDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IFieldDoc.cs,v 1.1 2004/10/30 16:04:43 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IFieldDoc { //Documentation for the field } } --- NEW FILE: IMethodDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IMethodDoc.cs,v 1.1 2004/10/30 16:04:43 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IMethodDoc { //Documentation for the method } } --- NEW FILE: IPropertyDoc.cs --- #region Copyright Notice /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IPropertyDoc.cs,v 1.1 2004/10/30 16:04:43 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ #endregion using Mono.CSharp; namespace MCSDoc { public interface IPropertyDoc { //Documentation for the property } } Index: AttributeDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/AttributeDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AttributeDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- AttributeDoc.cs 30 Oct 2004 16:04:42 -0000 1.2 *************** *** 29,33 **** get { ! throw new NotImplementedException() } } --- 29,33 ---- get { ! throw new NotImplementedException(); } } *************** *** 37,41 **** get { ! throw new NotImplementedException() } } --- 37,41 ---- get { ! throw new NotImplementedException(); } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 30 Oct 2004 14:30:30 -0000 1.2 --- ChangeLog 30 Oct 2004 16:04:42 -0000 1.3 *************** *** 3,6 **** --- 3,19 ---- 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * AccessFlags.cs : Added enumeration. + * AttributeDoc.cs : Missing ';'. + * ClassDocList.cs : Typo fixed. + It should implement IEnumerable + * DocTreeGenerator.cs : ParseNamespaces() - Refer to interfaces. + StructDoc/ClassDoc to IStructDoc/IClassDoc + * IContainer.cs : IMemberDoc renamed to IFieldDoc + * IEnumDoc.cs : Added interface for enum-doc. + * IFieldDoc.cs : Added interface for class/struct fields-doc + * IMethodDoc.cs : Added itnerface for method-doc. + + 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * RootDoc.cs : NamespaceLookup(string) - Don't return evaluating the value. Index: ClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/ClassDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClassDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- ClassDoc.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 78,81 **** --- 78,97 ---- } + public string Comments + { + get + { + throw new NotImplementedException(); + } + } + + public AccessFlags AccessFlags + { + get + { + throw new NotImplementedException(); + } + } + public string Name { *************** *** 126,130 **** } ! public IContainerDoc Container { get --- 142,146 ---- } ! public IContainerDoc ContainerDoc { get *************** *** 134,137 **** --- 150,225 ---- } + public IAttributeDoc[] Attributes + { + get + { + throw new NotImplementedException(); + } + } + + public IMethodDoc[] Methods + { + get + { + throw new NotImplementedException(); + } + } + + public IPropertyDoc[] Properties + { + get + { + throw new NotImplementedException(); + } + } + + public IFieldDoc[] Fields + { + get + { + throw new NotImplementedException(); + } + } + + public IClassDoc[] InnerClasses + { + get + { + throw new NotImplementedException(); + } + } + + public IDelegateDoc[] InnerDelegates + { + get + { + throw new NotImplementedException(); + } + } + + public IEnumDoc[] InnerEnums + { + get + { + throw new NotImplementedException(); + } + } + + public IInterfaceDoc[] InnerInterfaces + { + get + { + throw new NotImplementedException(); + } + } + + public IStructDoc[] InnerStructs + { + get + { + throw new NotImplementedException(); + } + } + public int CompareTo(object obj) { Index: ClassDocList.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/ClassDocList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClassDocList.cs 30 Oct 2004 14:26:14 -0000 1.1 --- ClassDocList.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- */ + using System; using Mono.CSharp; using System.Collections; *************** *** 14,18 **** namespace MCSDoc { ! public class ClassDocList : IEnumerator { private ArrayList classDocs = new ArrayList(); --- 15,19 ---- namespace MCSDoc { ! public class ClassDocList : IEnumerable { private ArrayList classDocs = new ArrayList(); *************** *** 38,45 **** get { ! if(index >= 0 && index < classDocc.Count) { return (IClassDoc)classDocs[index]; } } set --- 39,47 ---- get { ! if(index >= 0 && index < classDocs.Count) { return (IClassDoc)classDocs[index]; } + throw new ArgumentException();//IndexOutOfRangeException(); } set *************** *** 67,71 **** } ! public Enumerator GetEnumerator() { return classDocs.GetEnumerator(); --- 69,73 ---- } ! public IEnumerator GetEnumerator() { return classDocs.GetEnumerator(); Index: DocTreeGenerator.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/DocTreeGenerator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DocTreeGenerator.cs 30 Oct 2004 14:26:14 -0000 1.1 --- DocTreeGenerator.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 46,50 **** //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ! ParseCotnainer(root); //First need to populate [allNamespaces] --- 46,50 ---- //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ! ParseContainer(root); //First need to populate [allNamespaces] *************** *** 68,109 **** private void ParseNamespaces() { ! foreach(ClassDoc cd in this.allClasses) { ! if(cd.Namespace.Name != null) { ! OptNamespaceAdd(cd.Namespace.Name); } } ! foreach(StructDoc sd in this.allStructs) { ! if(sd.Namespace.Name != null) { ! OptNamespaceAdd(sd.Namespace.Name); } } ! foreach(EnumDoc ed in this.allEnums) { ! if(ed.Namespace.Name != null) { ! OptNamespaceAdd(ed.Namespace.Name); } } ! foreach(InterfaceDoc id in this.allInterfaces) { ! if(id.Namespace.Name != null) { ! OptNamespaceAdd(id.Namespace.Name); } } ! foreach(DelegateDoc dd in this.allDelegates) { ! if(dd.Namespace.Name != null) { ! OptNamespaceAdd(dd.Namespace.Name); } } } --- 68,115 ---- private void ParseNamespaces() { ! foreach(IClassDoc cd in this.allClasses) { ! if(cd.NamespaceName != null) { ! OptNamespaceAdd(cd.NamespaceName); } } ! foreach(IStructDoc sd in this.allStructs) { ! if(sd.NamespaceName != null) { ! OptNamespaceAdd(sd.NamespaceName); } } ! foreach(IEnumDoc ed in this.allEnums) { ! /** ! if(ed.NamespaceEntry.FullName != null) { ! OptNamespaceAdd(ed.NamespaceName); } + */ } ! foreach(IInterfaceDoc id in this.allInterfaces) { ! /** ! if(id.NamespaceEntry.FullName != null) { ! OptNamespaceAdd(id.NamespaceName); } + */ } ! foreach(IDelegateDoc dd in this.allDelegates) { ! /** ! if(dd.NamespaceEntry.FullName != null) { ! OptNamespaceAdd(dd.NamespaceName); } + */ } } *************** *** 123,149 **** } ! private void HandleNamespaceClass(Class klass, ClassDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(klass.Namespace.Name); nsd.AddClassDoc(doc); } ! private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, ! Mono.CSharp.Enum doc) { ! NamespaceDoc nsd = NamespaceLookup(eenum.Namespace.Name); ! allNamespaces.AddClassDoc(doc); } ! private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); ! nsd.AddStructDoc(doc); } --- 129,154 ---- } ! private void HandleNamespaceClass(Class klass, IClassDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } ! private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, ! IEnumDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(eenum.NamespaceEntry.FullName); ! nsd.AddEnumDoc(doc); } ! private NamespaceDoc NamespaceLookup(string name) { ! throw new NotImplementedException(); } *************** *** 161,172 **** private void ParseContainer(TypeContainer container) { ! if(containers != null) { if(container is Class) { Class c = (Class) container; ! ClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] if(c.BaseType.ToString() == "System.Attribute") { --- 166,179 ---- private void ParseContainer(TypeContainer container) { ! if(container != null) { if(container is Class) { Class c = (Class) container; ! IClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] + // c.BaseType.IsSubclassOf(typeof(System.Attribute)) + // || c.BaseType.IsSubclassOf(typeof(MCSAssembly.typeof(System.Attribute)) if(c.BaseType.ToString() == "System.Attribute") { *************** *** 180,184 **** { Struct s = (Struct) container; ! sd = new StructDoc(s); allStructs.Add(sd); } --- 187,191 ---- { Struct s = (Struct) container; ! IStructDoc sd = null;//new IStructDoc(s); allStructs.Add(sd); } *************** *** 197,201 **** foreach(Mono.CSharp.Delegate deleg in delegates) { ! DelegateDoc dd = new DelegateDoc(deleg); allDelegates.Add(dd); } --- 204,208 ---- foreach(Mono.CSharp.Delegate deleg in delegates) { ! IDelegateDoc dd = null;//new DelegateDoc(deleg); allDelegates.Add(dd); } *************** *** 209,213 **** foreach(Mono.CSharp.Enum eenum in enums) { ! EnumDoc ed = new EnumDoc(eenum); allDelegates.Add(ed); } --- 216,220 ---- foreach(Mono.CSharp.Enum eenum in enums) { ! IEnumDoc ed = null;//new EnumDoc(eenum); allDelegates.Add(ed); } *************** *** 221,225 **** foreach(Interface interf in interfaces) { ! InterfaceDoc id = new InterfaceDoc(interf); allInterfaces.Add(id); } --- 228,232 ---- foreach(Interface interf in interfaces) { ! IInterfaceDoc id = null;//new InterfaceDoc(interf); allInterfaces.Add(id); } Index: IContainerDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/IContainerDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IContainerDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- IContainerDoc.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 15,22 **** public interface IContainerDoc { ! string Comments { get; } ! string Name { get; } ! AccessFlags Flags { get; } ! bool IsContained { get; } // Returns non null only if(IsContained) --- 15,23 ---- public interface IContainerDoc { ! string Comments { get; } ! string Name { get; } ! AccessFlags AccessFlags { get; } ! bool IsContained { get; } ! string NamespaceName { get; } // Returns non null only if(IsContained) *************** *** 27,31 **** IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } ! IMemberDoc[] Members { get; } IClassDoc[] InnerClasses { get; } --- 28,32 ---- IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } ! IFieldDoc[] Fields { get; } IClassDoc[] InnerClasses { get; } Index: IInterfaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/IInterfaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IInterfaceDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- IInterfaceDoc.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 15,26 **** public interface IInterfaceDoc { ! string Comments { get; } ! string Name { get; } ! AccessFlags Flags { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } ! IMemberDoc[] Members { get; } IInterfaceDoc[] BaseInterfaces { get; } --- 15,29 ---- public interface IInterfaceDoc { ! string Comments { get; } ! string Name { get; } ! AccessFlags Flags { get; } ! string NamespaceName { get; } ! ! IInterfaceDoc BaseInterface { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } ! IFieldDoc[] Fields { get; } IInterfaceDoc[] BaseInterfaces { get; } Index: NamespaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/NamespaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NamespaceDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- NamespaceDoc.cs 30 Oct 2004 16:04:43 -0000 1.2 *************** *** 43,52 **** /// and sub-namespaces? /// </remarks> ! public static ArrayList CreateHierarchy(ArrayList namespaceDocs) { ArrayList retVal = new ArrayList(); string name; string[] subNames; ! if(namespaceDocs != null && namespaceDocs.Count > 0) { foreach(NamespaceDoc nd in namespaces) --- 43,52 ---- /// and sub-namespaces? /// </remarks> ! public static ArrayList CreateHierarchy(ArrayList namespaces) { ArrayList retVal = new ArrayList(); string name; string[] subNames; ! if(namespaces != null && namespaces.Count > 0) { foreach(NamespaceDoc nd in namespaces) *************** *** 76,79 **** --- 76,80 ---- throw new NotImplementedException(); } + throw new NotImplementedException(); } *************** *** 88,93 **** foreach(NamespaceDoc nsd in namespaces) { ! if(IsNamespaceAdded(name, nsd) return true; } return false; --- 89,96 ---- foreach(NamespaceDoc nsd in namespaces) { ! if(IsNamespaceAdded(name, nsd)) ! { return true; + } } return false; *************** *** 118,125 **** { if(name[cPos] == '.') ! dotIndices[cIndex++] = cPos; } ! string retVal[] = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { --- 121,131 ---- { if(name[cPos] == '.') ! { ! dotIndices[cIndex] = cPos; ! cIndex++; ! } } ! string[] retVal = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { *************** *** 139,148 **** } ! public void SetDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } ! public void SetEnumDoc(IEnumDoc doc) { enums.Add(doc); --- 145,154 ---- } ! public void AddDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } ! public void AddEnumDoc(IEnumDoc doc) { enums.Add(doc); *************** *** 170,173 **** --- 176,187 ---- } + public INamespaceDoc[] Namespaces + { + get + { + throw new NotImplementedException(); + } + } + public IClassDoc[] Classes { Index: RootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/RootDoc.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RootDoc.cs 30 Oct 2004 14:30:30 -0000 1.2 --- RootDoc.cs 30 Oct 2004 16:04:43 -0000 1.3 *************** *** 73,77 **** cd = new ClassDoc(c); } ! if(c.Namespace != null && c.Namespace.Name.Length > 0) { HandleNamespaceClass(c, cd); --- 73,77 ---- cd = new ClassDoc(c); } ! if(c.NamespaceEntry != null && c.NamespaceEntry.FullName.Length > 0) { HandleNamespaceClass(c, cd); *************** *** 82,87 **** { Struct s = (Struct)tc; ! StructDoc sd = new StructDoc(s); ! if(s.Namespace != null && s.Namespace.Name.Length > 0) { HandleNamespaceStruct(s, sd); --- 82,87 ---- { Struct s = (Struct)tc; ! IStructDoc sd = null;//new StructDoc(s); ! if(s.NamespaceEntry != null && s.NamespaceEntry.FullName.Length > 0) { HandleNamespaceStruct(s, sd); *************** *** 100,104 **** if(structs.Count > 0) { ! this.structs = (IClassDoc[]) classes.ToArray(typeof(IStructDoc)); } } --- 100,104 ---- if(structs.Count > 0) { ! this.structs = (IStructDoc[]) classes.ToArray(typeof(IStructDoc)); } } *************** *** 120,124 **** { retVal = new NamespaceDoc(name); ! namespaceList.Add(nsd); } return retVal; --- 120,124 ---- { retVal = new NamespaceDoc(name); ! namespaceList.Add(retVal); } return retVal; *************** *** 127,137 **** private void HandleNamespaceClass(Class klass, ClassDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(klass.Namespace.Name); nsd.AddClassDoc(doc); } ! private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); nsd.AddStructDoc(doc); } --- 127,137 ---- private void HandleNamespaceClass(Class klass, ClassDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(klass.NamespaceEntry.FullName); nsd.AddClassDoc(doc); } ! private void HandleNamespaceStruct(Struct esstruct, IStructDoc doc) { ! NamespaceDoc nsd = NamespaceLookup(esstruct.NamespaceEntry.FullName); nsd.AddStructDoc(doc); } *************** *** 147,154 **** { ArrayList enumDocs = new ArrayList(); ! EnumDoc doc; foreach(Mono.CSharp.Enum current in enums) { ! doc = new EnumDoc(current); enumDocs.Add(doc); } --- 147,154 ---- { ArrayList enumDocs = new ArrayList(); ! IEnumDoc doc = null; foreach(Mono.CSharp.Enum current in enums) { ! doc = null;//new EnumDoc(current); enumDocs.Add(doc); } *************** *** 166,173 **** { ArrayList delegateDocs = new ArrayList(); ! DelegateDoc doc; ! foreach(Delegate current in delegates) { ! doc = new DelegateDoc(current); delegateDocs.Add(doc); } --- 166,173 ---- { ArrayList delegateDocs = new ArrayList(); ! IDelegateDoc doc = null; ! foreach(Mono.CSharp.Delegate current in delegates) { ! doc = null;//new DelegateDoc(current); delegateDocs.Add(doc); } *************** *** 175,179 **** if(delegateDocs.Count > 0) { ! this.delegates = (IDelegateDoc[]) enumDocs.ToArray(typeof(IDelegateDoc)); } } --- 175,179 ---- if(delegateDocs.Count > 0) { ! this.delegates = (IDelegateDoc[]) delegateDocs.ToArray(typeof(IDelegateDoc)); } } *************** *** 185,192 **** { ArrayList interfaceDocs = new ArrayList(); ! InterfaceDoc doc; foreach(Interface current in interfaces) { ! doc = new DelegateDoc(current); interfaceDocs.Add(doc); } --- 185,192 ---- { ArrayList interfaceDocs = new ArrayList(); ! IInterfaceDoc doc = null; foreach(Interface current in interfaces) { ! doc = null;//new InterfaceDoc(current); interfaceDocs.Add(doc); } *************** *** 194,201 **** if(interfaceDocs.Count > 0) { ! this.interfaces = (IInterfaceDoc[]) enumDocs.ToArray(typeof(IInterfaceDoc)); } } } } } --- 194,249 ---- if(interfaceDocs.Count > 0) { ! this.interfaces = (IInterfaceDoc[]) interfaceDocs.ToArray(typeof(IInterfaceDoc)); } } } + + public INamespaceDoc[] Namespaces + { + get + { + throw new NotImplementedException(); + } + } + + public IClassDoc[] Classes + { + get + { + throw new NotImplementedException(); + } + } + + public IDelegateDoc[] Delegates + { + get + { + throw new NotImplementedException(); + } + } + + public IEnumDoc[] Enums + { + get + { + throw new NotImplementedException(); + } + } + + public IInterfaceDoc[] Interfaces + { + get + { + throw new NotImplementedException(); + } + } + + public IStructDoc[] Structs + { + get + { + throw new NotImplementedException(); + } + } } } |
From: <mas...@us...> - 2004-10-30 14:30:39
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15326 Modified Files: ChangeLog RootDoc.cs Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : NamespaceLookup(string) - Don't return evaluating the value. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 30 Oct 2004 14:26:14 -0000 1.1 --- ChangeLog 30 Oct 2004 14:30:30 -0000 1.2 *************** *** 3,6 **** --- 3,11 ---- 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * RootDoc.cs : NamespaceLookup(string) - Don't return + evaluating the value. + + 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * **.cs : Moving from ../../mcs/MCSDoc directory to here. Index: RootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc/RootDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RootDoc.cs 30 Oct 2004 14:26:14 -0000 1.1 --- RootDoc.cs 30 Oct 2004 14:30:30 -0000 1.2 *************** *** 112,116 **** if(current.Name == name) { ! return retVal = current; break; } --- 112,116 ---- if(current.Name == name) { ! retVal = current; break; } |
From: <mas...@us...> - 2004-10-30 14:26:34
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14455 Added Files: AttributeDoc.cs ChangeLog ClassDoc.cs ClassDocList.cs DocTreeGenerator.cs IAttributeDoc.cs IClassDoc.cs IContainerDoc.cs IInterfaceDoc.cs INamespaceDoc.cs IRootDoc.cs IStructDoc.cs NamespaceDoc.cs RootDoc.cs Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * **.cs : Moving from ../../mcs/MCSDoc directory to here. --- NEW FILE: AttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: AttributeDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { internal class AttributeDoc : ClassDoc, IAttributeDoc { private AccessFlags flags; private AttributeTargets targets; public AttributeDoc(Class klass) : base(klass) { if(!base.IsAttribute) throw new Exception("[AttributeDoc] Class is not an attribute"); } public AccessFlags Flags { get { throw new NotImplementedException() } } public AttributeTargets Targets { get { throw new NotImplementedException() } } } } --- NEW FILE: ChangeLog --- * $Id: ChangeLog,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * **.cs : Moving from ../../mcs/MCSDoc directory to here. 2003-04-06 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Checking for exception and attribute. Ummm! Looks clumsy. Will rectify it later. 2003-04-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : ParseAndGenerate() - No need for multiple calls here itself. : GenerateTree() - Lot of work. * NamespaceDoc.cs : No need for subnamespaces. * ClassDoc.cs : Implements IComparable. Need while sorting the array. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * NamespaceDoc.cs : Name { get; } - Added, CreateHierarchy(ArrayList) - Init impl, IsNamespaceAdded(string, ArrayList), IsNamespaceAdded(string, NamespaceDoc), GetSubnames(string) - Added. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * INamespaceDoc.cs : Namespaces { get; } - Sub-namespaces. * DocTreeGenerator.cs : Parsing done. Generation to start. * NamespaceDoc.cs : CreateHierarchy(ArrayList) - Stubbed. 2003-04-01 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * AttributeDoc.cs : Oops! Forgot to add last time. * RootDoc.cs : Don't parse here. * DocTreeGenerator.cs : Making it come to use. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Populated all. Will take a second look sometime later, especially for PopulateInners. Have to take of if class is an attribute. * AttributeDoc.cs : Initial implementation * ClassDoc.cs : Class { get; } - Added. : Accessibility - internal. 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * ClassDoc.cs : Parse() - Some impl. * RootDoc.cs : PopulateTypeContainers - Init Impl. * NamespaceDoc.cs : Initial implementation. * INamespaceDoc.cs : No Attributes to a namespace. Ok! * IAttributeDoc.cs, * IInterfaceDoc.cs, * IContainerDoc.cs : Name { get; } - Added. * IAttributeDoc.cs : Now derives from IContainerDoc 2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Stubbed PopulateXXXX methods * DocTreeGenerator.cs : Looks like won't need it in future 2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementation. * ClassDoc.cs : Initial implementation. * DocTreeGenerator.cs : Going ahead and back and ahead. * IContainerDoc.cs : IContainerDoc made property. * IRootDoc.cs : Namespaces is INamespace[] 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : Stubbed RootDoc { get; } 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IAttributeDoc.cs, * IInterfaceDoc.cs : Added interfaces * ClassDoc.cs : Initial implementation * DocTreeGenerator.cs : Initial implementation 2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs : Don't use *List classes. * ClassDocList.cs : Will remove it later. * IContainerDoc.cs : Superinterfaces for IClassDoc, IStructDoc since both of them can hold all other types inside them. * IStructDoc.cs : Added interface. 2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs, * ClassDocList.cs : Trying to see what works best. Still not sure of what classes to have and what properties will they have. 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Removed * IRootDoc.cs : Added interface * ClassDocList.cs : List of IClassDoc 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementaion. --- NEW FILE: ClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class ClassDoc : IClassDoc, IComparable { private Class klass; private string name; private bool isException = false; private bool isAttribute = false; private IClassDoc baseClass = null; private IInterfaceDoc[] interfaces = null; private IContainerDoc container = null; public ClassDoc(Class klass) { this.klass = klass; // need to Set - BaseClass, Interfaces, Container throw new NotImplementedException(); } private void Parse() { /* ArrayList bases = klass.Bases; if(bases != null || bases.Count > 0) { // } */ if(klass.BaseType != null) { isAttribute = IsSubtypeOf(TypeManager.attribute_type); isException = IsSubtypeOf(TypeManager.exception_type); } } private bool IsSubtypeOf(Type type) { Type baseType = klass.BaseType; while(baseType != null && baseType.ToString() != type.ToString()) { if(baseType.IsSubclassOf(type)) return true; baseType = baseType.BaseType; } return false; } protected Class Class { get { return this.klass; } } public string NamespaceName { get { throw new NotImplementedException(); } } public string Name { get { return name; } } public bool IsContained { get { return this.container != null; } } public bool IsException { get { return isException; } } public bool IsAttribute { get { return isAttribute; } } public IClassDoc BaseClass { get { return baseClass; } } public IInterfaceDoc[] Interfaces { get { return interfaces; } } public IContainerDoc Container { get { return this.container; } } public int CompareTo(object obj) { if(obj is ClassDoc) { ClassDoc other = (ClassDoc) obj; string otherName = other.Name; if(other.NamespaceName == this.NamespaceName) { return (this.Name.CompareTo(other.Name)); } // I know this is wrong. return NamespaceName.CompareTo(other.NamespaceName); } throw new ArgumentException("[CompareTo] obj is not of" + " type ClassDoc"); } } } --- NEW FILE: ClassDocList.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: ClassDocList.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System.Collections; namespace MCSDoc { public class ClassDocList : IEnumerator { private ArrayList classDocs = new ArrayList(); public ClassDocList() { } public ClassDocList(ArrayList classDocs) { if(classDocs != null) { foreach(object c in classDocs) { if(c is IClassDoc) Add((IClassDoc)c); } } } public IClassDoc this[int index] { get { if(index >= 0 && index < classDocc.Count) { return (IClassDoc)classDocs[index]; } } set { classDocs[index] = value; } } public int Count { get { return classDocs.Count; } } public void Add(IClassDoc classDoc) { classDocs.Add(classDoc); } public bool Contains(IClassDoc classDoc) { return classDocs.Contains(classDoc); } public Enumerator GetEnumerator() { return classDocs.GetEnumerator(); } } } --- NEW FILE: DocTreeGenerator.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: DocTreeGenerator.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; using System.Collections; namespace MCSDoc { internal class DocTreeGenerator { private TypeContainer root = null; private RootDoc rootDoc = null; private ArrayList allNamespaces = new ArrayList(); private ArrayList allClasses = new ArrayList(); private ArrayList allStructs = new ArrayList(); private ArrayList allDelegates = new ArrayList(); private ArrayList allEnums = new ArrayList(); private ArrayList allInterfaces = new ArrayList(); public DocTreeGenerator(TypeContainer root) { if(root == null) { throw new ArgumentException("[DocTreeGenerator] Null root"); } this.root = root; //rootDoc = new RootDoc(root); ParseAndGenerate(); } private void ParseAndGenerate() { //rootDoc.Parse(root); //ParseContainers(root.Types); //ParseDelegates(root.Delegates); //ParseEnums(root.Enums); //ParseInterfaces(root.Interfaces); ParseCotnainer(root); //First need to populate [allNamespaces] //or should I populate while generating tree? ParseNamespaces(); GenerateTree(); } private void GenerateTree() { rootDoc = new RootDoc(); //Need to add ONLY namespaces and all types //that are not inside any namespace. //Namespaces will recursively contain all the //types that are within any namespace. //Now, I will go home today and work on the //exact logic for whole of this system! throw new NotImplementedException(); } private void ParseNamespaces() { foreach(ClassDoc cd in this.allClasses) { if(cd.Namespace.Name != null) { OptNamespaceAdd(cd.Namespace.Name); } } foreach(StructDoc sd in this.allStructs) { if(sd.Namespace.Name != null) { OptNamespaceAdd(sd.Namespace.Name); } } foreach(EnumDoc ed in this.allEnums) { if(ed.Namespace.Name != null) { OptNamespaceAdd(ed.Namespace.Name); } } foreach(InterfaceDoc id in this.allInterfaces) { if(id.Namespace.Name != null) { OptNamespaceAdd(id.Namespace.Name); } } foreach(DelegateDoc dd in this.allDelegates) { if(dd.Namespace.Name != null) { OptNamespaceAdd(dd.Namespace.Name); } } } private void OptNamespaceAdd(string name) { foreach(NamespaceDoc current in allNamespaces) { if(current.Name == name) { return; } } NamespaceDoc nsd = new NamespaceDoc(name); allNamespaces.Add(nsd); } private void HandleNamespaceClass(Class klass, ClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.Namespace.Name); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); nsd.AddStructDoc(doc); } private void HandleNamespaceEnum(Mono.CSharp.Enum eenum, Mono.CSharp.Enum doc) { NamespaceDoc nsd = NamespaceLookup(eenum.Namespace.Name); allNamespaces.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); nsd.AddStructDoc(doc); } private void ParseContainers(ArrayList containers) { if(containers != null && containers.Count > 0) { foreach(TypeContainer tc in containers) { ParseContainer(tc); } } } private void ParseContainer(TypeContainer container) { if(containers != null) { if(container is Class) { Class c = (Class) container; ClassDoc cd = null; // Is there any better way, since // [c.BaseType != typeof(System.Attribute)] if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } else { cd = new ClassDoc(c); } allClasses.Add(cd); } else if(container is Struct) { Struct s = (Struct) container; sd = new StructDoc(s); allStructs.Add(sd); } //Handle all inner types recursively ParseContainers(container.Types); ParseDelegates(container.Delegates); ParseEnums(container.Enums); ParseInterfaces(container.Interfaces); } } private void ParseDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { foreach(Mono.CSharp.Delegate deleg in delegates) { DelegateDoc dd = new DelegateDoc(deleg); allDelegates.Add(dd); } } } private void ParseEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { foreach(Mono.CSharp.Enum eenum in enums) { EnumDoc ed = new EnumDoc(eenum); allDelegates.Add(ed); } } } private void ParseInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { foreach(Interface interf in interfaces) { InterfaceDoc id = new InterfaceDoc(interf); allInterfaces.Add(id); } } } public IRootDoc RootDoc { get { return rootDoc; } } } } --- NEW FILE: IAttributeDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IAttributeDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { public interface IAttributeDoc : IClassDoc { AccessFlags Flags { get; } AttributeTargets Targets { get; } } } --- NEW FILE: IClassDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IClassDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IClassDoc : IContainerDoc { bool IsException { get; } bool IsAttribute { get; } /// <summary> /// Returns document element for the /// base class, if any. /// </summary> IClassDoc BaseClass { get; } /// <summary> /// Returns document elements for the /// implemented interfaces, if any. /// </summary> IInterfaceDoc[] Interfaces { get; } } } --- NEW FILE: IContainerDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IContainerDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IContainerDoc { string Comments { get; } string Name { get; } AccessFlags Flags { get; } bool IsContained { get; } // Returns non null only if(IsContained) // may throw an exception otherwise IContainerDoc ContainerDoc { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IMemberDoc[] Members { get; } IClassDoc[] InnerClasses { get; } IDelegateDoc[] InnerDelegates { get; } IEnumDoc[] InnerEnums { get; } IInterfaceDoc[] InnerInterfaces { get; } IStructDoc[] InnerStructs { get; } } } --- NEW FILE: IInterfaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IInterfaceDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IInterfaceDoc { string Comments { get; } string Name { get; } AccessFlags Flags { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IMemberDoc[] Members { get; } IInterfaceDoc[] BaseInterfaces { get; } } } --- NEW FILE: INamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: INamespaceDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface INamespaceDoc { string Comments { get; } string Name { get; } INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IRootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IRootDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IRootDoc { INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } IEnumDoc[] Enums { get; } IInterfaceDoc[] Interfaces { get; } IStructDoc[] Structs { get; } } } --- NEW FILE: IStructDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: IStructDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IStructDoc : IContainerDoc { } } --- NEW FILE: NamespaceDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: NamespaceDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class NamespaceDoc : INamespaceDoc { private string comments; private string name; ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); ArrayList delegates = new ArrayList(); ArrayList enums = new ArrayList(); ArrayList interfaces = new ArrayList(); public NamespaceDoc(string name) { this.name = name; } public NamespaceDoc(string name, string filename) : this(name) { throw new NotImplementedException(); } /// <summary> /// Will create a hierarchy of NamespaceDoc elements. /// </summary> /// <remarks> /// btw, do I really need this scrap funda of Parent namespace /// and sub-namespaces? /// </remarks> public static ArrayList CreateHierarchy(ArrayList namespaceDocs) { ArrayList retVal = new ArrayList(); string name; string[] subNames; if(namespaceDocs != null && namespaceDocs.Count > 0) { foreach(NamespaceDoc nd in namespaces) { name = nd.Name; bool isAdded = IsNamespaceAdded(name, retVal); /* if(!isAdded) { subNames = GetSubnames(name); if(subNames != null) { foreach(string subName in subNames) { isAdded &= IsNamespaceAdded(subName, retVal); if(isAdded) break; } } } */ AddNamespaceInHierarchy(nd, retVal); throw new NotImplementedException(); } throw new NotImplementedException(); } } private static void AddNamespaceInHierarchy(NamespaceDoc doc, ArrayList docList) { throw new NotImplementedException(); } private static bool IsNamespaceAdded(string name, ArrayList namespaces) { foreach(NamespaceDoc nsd in namespaces) { if(IsNamespaceAdded(name, nsd) return true; } return false; } private static bool IsNamespaceAdded(string name, NamespaceDoc doc) { throw new NotImplementedException(); } private static string[] GetSubnames(string name) { int dotCount = 0; foreach(char c in name) { if(c == '.') dotCount++; } if(dotCount == 0) return null; int[] dotIndices = new int[dotCount]; int cIndex = 0; int cPos = 0; for(cPos = 0; cPos < name.Length; cPos++) { if(name[cPos] == '.') dotIndices[cIndex++] = cPos; } string retVal[] = new string[dotCount]; for(cIndex = 0; cIndex < dotCount; cIndex++) { retVal[cIndex] = name.Substring(0, dotIndices[cIndex] - 1); } return retVal; } public void AddClassDoc(IClassDoc doc) { classes.Add(doc); } public void AddStructDoc(IStructDoc doc) { structs.Add(doc); } public void SetDelegateDoc(IDelegateDoc doc) { delegates.Add(doc); } public void SetEnumDoc(IEnumDoc doc) { enums.Add(doc); } public void AddInterfaceDoc(IInterfaceDoc doc) { interfaces.Add(doc); } public string Name { get { return this.name; } } public string Comments { get { return comments; } } public IClassDoc[] Classes { get { return (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } } public IDelegateDoc[] Delegates { get { return (IDelegateDoc[]) delegates.ToArray(typeof(IDelegateDoc)); } } public IEnumDoc[] Enums { get { return (IEnumDoc[]) enums.ToArray(typeof(IEnumDoc)); } } public IInterfaceDoc[] Interfaces { get { return (IInterfaceDoc[]) interfaces.ToArray(typeof(IInterfaceDoc)); } } public IStructDoc[] Structs { get { return (IStructDoc[]) interfaces.ToArray(typeof(IStructDoc)); } } } } --- NEW FILE: RootDoc.cs --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * $Id: RootDoc.cs,v 1.1 2004/10/30 14:26:14 mastergaurav Exp $ * Copyright: (C) 2003, Gaurav Vaish * */ using System; using System.Collections; using Mono.CSharp; namespace MCSDoc { internal class RootDoc : IRootDoc { INamespaceDoc[] namespaces = null; IClassDoc[] classes = null; IStructDoc[] structs = null; IDelegateDoc[] delegates = null; IEnumDoc[] enums = null; IInterfaceDoc[] interfaces = null; ArrayList namespaceList = new ArrayList(); public RootDoc(TypeContainer root) { //Parse(root); } public RootDoc() { //Do nothing! } private void Parse(TypeContainer root) { PopulateContainers(root.Types); throw new NotImplementedException(); } private void PopulateNamespaces() { if(namespaceList.Count > 0) { //namespaces = (INamespaceDoc[]) namespaceList.ToArray(typeof(INamespaceDoc)); } } private void PopulateContainers(ArrayList containers) { if(containers != null || containers.Count > 0) { ArrayList classes = new ArrayList(); ArrayList structs = new ArrayList(); foreach(TypeContainer tc in containers) { if(tc is Class) { Class c = (Class)tc; ClassDoc cd = null; if(c.BaseType != null) { if(c.BaseType.ToString() == "System.Attribute") { cd = new AttributeDoc(c); } } else { cd = new ClassDoc(c); } if(c.Namespace != null && c.Namespace.Name.Length > 0) { HandleNamespaceClass(c, cd); } // process ClassDoc classes.Add(cd); } else if(tc is Struct) { Struct s = (Struct)tc; StructDoc sd = new StructDoc(s); if(s.Namespace != null && s.Namespace.Name.Length > 0) { HandleNamespaceStruct(s, sd); } // process StructDoc structs.Add(sd); } PopulateInners(tc.Types); } if(classes.Count > 0) { this.classes = (IClassDoc[]) classes.ToArray(typeof(IClassDoc)); } if(structs.Count > 0) { this.structs = (IClassDoc[]) classes.ToArray(typeof(IStructDoc)); } } } private NamespaceDoc NamespaceLookup(string name) { NamespaceDoc retVal = null; foreach(NamespaceDoc current in namespaceList) { if(current.Name == name) { return retVal = current; break; } } if(retVal == null) { retVal = new NamespaceDoc(name); namespaceList.Add(nsd); } return retVal; } private void HandleNamespaceClass(Class klass, ClassDoc doc) { NamespaceDoc nsd = NamespaceLookup(klass.Namespace.Name); nsd.AddClassDoc(doc); } private void HandleNamespaceStruct(Struct esstruct, StructDoc doc) { NamespaceDoc nsd = NamespaceLookup(esstruct.Namespace.Name); nsd.AddStructDoc(doc); } private void PopulateInners(ArrayList types) { throw new NotImplementedException(); } private void PopulateEnums(ArrayList enums) { if(enums != null && enums.Count > 0) { ArrayList enumDocs = new ArrayList(); EnumDoc doc; foreach(Mono.CSharp.Enum current in enums) { doc = new EnumDoc(current); enumDocs.Add(doc); } if(enumDocs.Count > 0) { this.enums = (IEnumDoc[]) enumDocs.ToArray(typeof(IEnumDoc)); } } } private void PopulateDelegates(ArrayList delegates) { if(delegates != null && delegates.Count > 0) { ArrayList delegateDocs = new ArrayList(); DelegateDoc doc; foreach(Delegate current in delegates) { doc = new DelegateDoc(current); delegateDocs.Add(doc); } if(delegateDocs.Count > 0) { this.delegates = (IDelegateDoc[]) enumDocs.ToArray(typeof(IDelegateDoc)); } } } private void PopulateInterfaces(ArrayList interfaces) { if(interfaces != null && interfaces.Count > 0) { ArrayList interfaceDocs = new ArrayList(); InterfaceDoc doc; foreach(Interface current in interfaces) { doc = new DelegateDoc(current); interfaceDocs.Add(doc); } if(interfaceDocs.Count > 0) { this.interfaces = (IInterfaceDoc[]) enumDocs.ToArray(typeof(IInterfaceDoc)); } } } } } |
From: <mas...@us...> - 2004-10-30 14:23:31
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13740/MCSDoc Log Message: Directory /cvsroot/csdoc/csdoc/src/mcsdoc/MCSDoc added to the repository |
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12102 Modified Files: ChangeLog test_03.cs test_05.cs test_19.cs test_22.cs test_23.cs test_24.cs Added Files: .cvsignore param1 Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * .cvsignore : Ignore some common files * param1 : Let's go for full fledged test. mcsdoc @param1 * test_*.cs : Renamed all data-names to MCSDoc_Test_* --- NEW FILE: .cvsignore --- *.exe *.dll --- NEW FILE: param1 --- /out:test.dll /target:library *.cs Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ChangeLog 10 Apr 2003 05:16:02 -0000 1.18 --- ChangeLog 30 Oct 2004 14:16:52 -0000 1.19 *************** *** 1,2 **** --- 1,10 ---- + $Id$ + + 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * .cvsignore : Ignore some common files + * param1 : Let's go for full fledged test. + mcsdoc @param1 + * test_*.cs : Renamed all data-names to MCSDoc_Test_* 2003-04-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> Index: test_03.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_03.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_03.cs 20 Feb 2003 06:57:38 -0000 1.1 --- test_03.cs 30 Oct 2004 14:16:52 -0000 1.2 *************** *** 4,12 **** * <summary>test_03</summary> */ ! public class test_03 { ! // Comment over test_03::Arbit(alpha[] args) // How does it work? ! public static void Arbit(alpha[] a, beta b) { System.Console.WriteLine("Inside Main..."); --- 4,34 ---- * <summary>test_03</summary> */ ! public class MCSDoc_Tests_test_03 { ! /// <summary> ! /// This is enum alpha! ! /// </summary> ! public enum Alpha ! { ! A, ! B ! } ! ! /** ! * And this is struct beta ! * ! * @author $Author$ ! * @version $Revision$ ! */ ! public struct Beta ! { ! public Beta(int x) ! { ! } ! } ! ! // Comment over test_03::Arbit(Alpha[] args) // How does it work? ! public static void Arbit(Alpha[] a, Beta b) { System.Console.WriteLine("Inside Main..."); Index: test_05.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_05.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_05.cs 8 Apr 2003 06:22:10 -0000 1.2 --- test_05.cs 30 Oct 2004 14:16:52 -0000 1.3 *************** *** 1,13 **** using System; ! public class test_05Exception : Exception { // Default ctor ! public test_05Exception() : base() { } // ctor with message ! public test_05Exception(string message) : base(message) { } --- 1,13 ---- using System; ! public class MCSDoc_test_05Exception : Exception { // Default ctor ! public MCSDoc_test_05Exception() : base() { } // ctor with message ! public MCSDoc_test_05Exception(string message) : base(message) { } Index: test_19.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_19.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_19.cs 8 Apr 2003 06:22:10 -0000 1.2 --- test_19.cs 30 Oct 2004 14:16:53 -0000 1.3 *************** *** 5,13 **** */ [AttributeUsage(AttributeTargets.All)] ! public class test_19Attribute : Attribute { private int value; ! public test_19Attribute() { } --- 5,13 ---- */ [AttributeUsage(AttributeTargets.All)] ! public class MCSDoc_Test_19Attribute : Attribute { private int value; ! public MCSDoc_Test_19Attribute() { } Index: test_22.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_22.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_22.cs 8 Apr 2003 06:22:10 -0000 1.1 --- test_22.cs 30 Oct 2004 14:16:53 -0000 1.2 *************** *** 1,13 **** using System; ! public class test_22Exception : test_05Exception { // Default ctor ! public test_22Exception() : base() { } // ctor with message ! public test_22Exception(string message) : base(message) { } --- 1,13 ---- using System; ! public class MCSDoc_test_22Exception : MCSDoc_test_05Exception { // Default ctor ! public MCSDoc_test_22Exception() : base() { } // ctor with message ! public MCSDoc_test_22Exception(string message) : base(message) { } Index: test_23.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_23.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_23.cs 8 Apr 2003 06:22:10 -0000 1.1 --- test_23.cs 30 Oct 2004 14:16:53 -0000 1.2 *************** *** 5,13 **** */ [AttributeUsage(AttributeTargets.All)] ! public class test_23Attribute : test_19Attribute { private int otherValue; ! public test_23Attribute() { } --- 5,13 ---- */ [AttributeUsage(AttributeTargets.All)] ! public class MCSDoc_test_23Attribute : MCSDoc_Test_19Attribute { private int otherValue; ! public MCSDoc_test_23Attribute() { } Index: test_24.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_24.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_24.cs 8 Apr 2003 06:22:10 -0000 1.1 --- test_24.cs 30 Oct 2004 14:16:53 -0000 1.2 *************** *** 27,31 **** } ! namespace MCSDoc.Tests1 { enum test_24 --- 27,31 ---- } ! namespace MCSDoc.Tests24 { enum test_24 |
From: <mas...@us...> - 2004-10-30 14:10:33
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/mcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10760 Modified Files: decl.cs Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * decl.cs : public string Documentation - Added field. Index: decl.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/decl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** decl.cs 29 Oct 2004 14:16:19 -0000 1.1 --- decl.cs 30 Oct 2004 14:10:15 -0000 1.2 *************** *** 152,155 **** --- 152,161 ---- internal Flags caching_flags; + /// <summary> + /// Holds the doc-comments. + /// </summary> + /// <remarks>master's hack</remarks> + public string Documentation; + public MemberCore (TypeContainer parent, MemberName name, Attributes attrs, Location loc) |
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/mcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10439 Modified Files: ChangeLog.mcsdoc class.cs cs-parser.jay cs-tokenizer.cs driver.cs ecore.cs parameter.cs statement.cs support.cs Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * cs-parser.jay : Updated to grab the comments. Includes update in definition of enum_declaration. * cs-tokenizer.cs : Enable documentation gathering * class.cs : Type BaseType { get; } - Added property Fixed some typos in comments. "csc /doc" was complaining a lot. * decl.cs, * ecore.cs : public string Documentation - Added field. * parameter.cs : Changed "&" to "&" in doc. * statement.cs : "summmary" to "summary" * support.cs : "remarks" to "summary" Index: ChangeLog.mcsdoc =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/ChangeLog.mcsdoc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog.mcsdoc 30 Oct 2004 13:57:16 -0000 1.4 --- ChangeLog.mcsdoc 30 Oct 2004 14:09:08 -0000 1.5 *************** *** 3,6 **** --- 3,21 ---- 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * cs-parser.jay : Updated to grab the comments. + Includes update in definition of + enum_declaration. + * cs-tokenizer.cs : Enable documentation gathering + * class.cs : Type BaseType { get; } - Added property + Fixed some typos in comments. + "csc /doc" was complaining a lot. + * decl.cs, + * ecore.cs : public string Documentation - Added field. + * parameter.cs : Changed "&" to "&" in doc. + * statement.cs : "summmary" to "summary" + * support.cs : "remarks" to "summary" + + 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * mcs.exe.sources, * mcs.exe.config : Remove this also. Index: class.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/class.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** class.cs 29 Oct 2004 14:16:19 -0000 1.1 --- class.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 830,833 **** --- 830,847 ---- } + private TypeExpr baseClassType = null; + + /// <summary> + /// Returns the type of the base class + /// </summary> + /// <remarks>master's hack</remarks> + public Type BaseType + { + get + { + return baseClassType.Type; + } + } + // // Emits the instance field initializers *************** *** 898,905 **** } ! /// <remarks> /// The pending methods that need to be implemented ! // (interfaces or abstract methods) ! /// </remarks> public PendingImplementation Pending; --- 912,919 ---- } ! /// <summary> /// The pending methods that need to be implemented ! /// (interfaces or abstract methods) ! /// </summary> public PendingImplementation Pending; *************** *** 1148,1151 **** --- 1162,1171 ---- return null; + //master's hack + if(baseClassType == null) + { + baseClassType = parent; + } + if (parent == null) { if (Kind == Kind.Class){ *************** *** 1556,1573 **** /// implementation can't take care of that. /// </summary> ! // ! // FIXME: return an empty static array instead of null, that cleans up ! // some code and is consistent with some coding conventions I just found ! // out existed ;-) ! // ! // ! // Notice that in various cases we check if our field is non-null, ! // something that would normally mean that there was a bug elsewhere. ! // ! // The problem happens while we are defining p-invoke methods, as those ! // will trigger a FindMembers, but this happens before things are defined ! // ! // Since the whole process is a no-op, it is fine to check for null here. ! // public override MemberList FindMembers (MemberTypes mt, BindingFlags bf, MemberFilter filter, object criteria) --- 1576,1593 ---- /// implementation can't take care of that. /// </summary> ! /// <remarks> ! /// FIXME: return an empty static array instead of null, that cleans up ! /// some code and is consistent with some coding conventions I just found ! /// out existed ;-) ! /// ! /// ! /// Notice that in various cases we check if our field is non-null, ! /// something that would normally mean that there was a bug elsewhere. ! /// ! /// The problem happens while we are defining p-invoke methods, as those ! /// will trigger a FindMembers, but this happens before things are defined ! /// ! /// Since the whole process is a no-op, it is fine to check for null here. ! /// </remarks> public override MemberList FindMembers (MemberTypes mt, BindingFlags bf, MemberFilter filter, object criteria) *************** *** 5992,5996 **** } ! /// </summary> /// Gigantic workaround for lameness in SRE follows : /// This class derives from EventInfo and attempts to basically --- 6012,6016 ---- } ! /// <summary> /// Gigantic workaround for lameness in SRE follows : /// This class derives from EventInfo and attempts to basically Index: cs-parser.jay =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/cs-parser.jay,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cs-parser.jay 29 Oct 2004 14:16:19 -0000 1.1 --- cs-parser.jay 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 60,64 **** /// Used to determine if we are parsing the get/set pair /// of an indexer or a property ! /// </summmary> bool parsing_indexer; --- 60,64 ---- /// Used to determine if we are parsing the get/set pair /// of an indexer or a property ! /// </summary> bool parsing_indexer; *************** *** 82,86 **** /// SourceFile file; ! /// Current attribute target --- 82,87 ---- /// SourceFile file; ! ! string mcsdoc_docs; /// Current attribute target *************** *** 734,738 **** current_container = current_class; RootContext.Tree.RecordDecl (name.GetName (true), current_class); ! new_struct.Documentation = lexer.GetDocs(); } } --- 735,740 ---- current_container = current_class; RootContext.Tree.RecordDecl (name.GetName (true), current_class); ! current_class.Documentation = lexer.GetDocs(); ! //lexer.SaveDocument(); } } *************** *** 811,814 **** --- 813,818 ---- current_container.AddConstant (c); + c.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } } *************** *** 863,866 **** --- 867,872 ---- current_container.AddField (field); + field.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } } *************** *** 941,944 **** --- 947,952 ---- method.Block = (ToplevelBlock) $3; current_container.AddMethod (method); + method.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); current_local_parameters = null; *************** *** 993,996 **** --- 1001,1007 ---- (Attributes) $1, lexer.Location); + method.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); + current_local_parameters = (Parameters) $6; $$ = method; *************** *** 1173,1176 **** --- 1184,1189 ---- current_container.AddProperty (prop); + prop.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); implicit_value_parameter_type = null; iterator_container = null; *************** *** 1283,1286 **** --- 1296,1301 ---- current_container = current_class; RootContext.Tree.RecordDecl (name.GetName (true), current_class); + current_class.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } } *************** *** 1364,1369 **** MemberName name = (MemberName) $4; ! $$ = new Method (current_class, (Expression) $3, (int) $2, true, name, (Parameters) $6, (Attributes) $1, lexer.Location); } | opt_attributes opt_new VOID namespace_or_type_name --- 1379,1387 ---- MemberName name = (MemberName) $4; ! Method im = new Method (current_class, (Expression) $3, (int) $2, true, name, (Parameters) $6, (Attributes) $1, lexer.Location); + im.Documentation = lexer.GetDocs(); + $$ = im; + //lexer.SaveDocument(); } | opt_attributes opt_new VOID namespace_or_type_name *************** *** 1373,1378 **** MemberName name = (MemberName) $4; ! $$ = new Method (current_class, TypeManager.system_void_expr, (int) $2, true, name, (Parameters) $6, (Attributes) $1, lexer.Location); } ; --- 1391,1399 ---- MemberName name = (MemberName) $4; ! Method im = new Method (current_class, TypeManager.system_void_expr, (int) $2, true, name, (Parameters) $6, (Attributes) $1, lexer.Location); + im.Documentation = lexer.GetDocs(); + $$ = im; + //lexer.SaveDocument(); } ; *************** *** 1390,1396 **** InterfaceAccessorInfo pinfo = (InterfaceAccessorInfo) $7; ! $$ = new Property (current_class, (Expression) $3, (int) $2, true, new MemberName ((string) $4), (Attributes) $1, pinfo.Get, pinfo.Set, lexer.Location); } | opt_attributes --- 1411,1420 ---- InterfaceAccessorInfo pinfo = (InterfaceAccessorInfo) $7; ! Property ip = new Property (current_class, (Expression) $3, (int) $2, true, new MemberName ((string) $4), (Attributes) $1, pinfo.Get, pinfo.Set, lexer.Location); + ip.Documentation = lexer.GetDocs(); + $$ = ip; + //lexer.SaveDocument(); } | opt_attributes *************** *** 1414,1420 **** : opt_attributes opt_new EVENT type IDENTIFIER SEMICOLON { ! $$ = new EventField (current_class, (Expression) $4, (int) $2, true, new MemberName ((string) $5), null, (Attributes) $1, lexer.Location); } | opt_attributes opt_new EVENT type error { --- 1438,1447 ---- : opt_attributes opt_new EVENT type IDENTIFIER SEMICOLON { ! EventField ie = new EventField (current_class, (Expression) $4, (int) $2, true, new MemberName ((string) $5), null, (Attributes) $1, lexer.Location); + ie.Documentation = lexer.GetDocs(); + $$ = ie; + //lexer.SaveDocument(); } | opt_attributes opt_new EVENT type error { *************** *** 1443,1450 **** InterfaceAccessorInfo info = (InterfaceAccessorInfo) $10; ! $$ = new Indexer (current_class, (Expression) $3, new MemberName (TypeContainer.DefaultIndexerName), (int) $2, true, (Parameters) $6, (Attributes) $1, info.Get, info.Set, lexer.Location); } ; --- 1470,1480 ---- InterfaceAccessorInfo info = (InterfaceAccessorInfo) $10; ! Indexer ii = new Indexer (current_class, (Expression) $3, new MemberName (TypeContainer.DefaultIndexerName), (int) $2, true, (Parameters) $6, (Attributes) $1, info.Get, info.Set, lexer.Location); + ii.Documentation = lexer.GetDocs(); + $$ = ii; + //lexer.SaveDocument(); } ; *************** *** 1476,1479 **** --- 1506,1512 ---- current_container.AddOperator (op); + op.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); + current_local_parameters = null; iterator_container = null; *************** *** 1648,1653 **** { Location l = (Location) oob_stack.Pop (); ! $$ = new Constructor (current_class, (string) $1, 0, (Parameters) $3, (ConstructorInitializer) $6, l); } ; --- 1681,1689 ---- { Location l = (Location) oob_stack.Pop (); ! Constructor ctor = new Constructor (current_class, (string) $1, 0, (Parameters) $3, (ConstructorInitializer) $6, l); + ctor.Documentation = lexer.GetDocs(); + $$ = ctor; + //lexer.SaveDocument(); } ; *************** *** 1714,1717 **** --- 1750,1755 ---- d.Block = (ToplevelBlock) $7; current_container.AddMethod (d); + d.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } } *************** *** 1733,1737 **** current_container.AddEvent (e); ! } } --- 1771,1776 ---- current_container.AddEvent (e); ! e.Documentation = lexer.GetDocs(); ! //lexer.SaveDocument(); } } *************** *** 1767,1770 **** --- 1806,1811 ---- current_container.AddEvent (e); + e.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); implicit_value_parameter_type = null; } *************** *** 1883,1886 **** --- 1924,1929 ---- current_container.AddIndexer (indexer); + indexer.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); current_local_parameters = null; *************** *** 1923,1926 **** --- 1966,1973 ---- ENUM IDENTIFIER opt_enum_base + { + mcsdoc_docs = lexer.GetDocs(); + //lexer.SaveDocument(); + } enum_body opt_semicolon *************** *** 1932,1936 **** full_name, (Attributes) $1, enum_location); ! foreach (VariableDeclaration ev in (ArrayList) $6) { e.AddEnumMember (ev.identifier, (Expression) ev.expression_or_array_initializer, --- 1979,1983 ---- full_name, (Attributes) $1, enum_location); ! foreach (VariableDeclaration ev in (ArrayList) $7) { e.AddEnumMember (ev.identifier, (Expression) ev.expression_or_array_initializer, *************** *** 1941,1945 **** current_container.AddEnum (e); RootContext.Tree.RecordDecl (name, e); ! } ; --- 1988,1992 ---- current_container.AddEnum (e); RootContext.Tree.RecordDecl (name, e); ! e.Documentation = mcsdoc_docs; } ; *************** *** 1983,1987 **** : opt_attributes IDENTIFIER { ! $$ = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1); } | opt_attributes IDENTIFIER --- 2030,2037 ---- : opt_attributes IDENTIFIER { ! VariableDeclaration vd = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1); ! vd.Documentation = lexer.GetDocs(); ! $$ = vd; ! //lexer.SaveDocument(); } | opt_attributes IDENTIFIER *************** *** 1991,1995 **** ASSIGN expression { ! $$ = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1); } ; --- 2041,2048 ---- ASSIGN expression { ! VariableDeclaration vd = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1); ! vd.Documentation = lexer.GetDocs(); ! $$ = vd; ! //lexer.SaveDocument(); } ; *************** *** 2009,2013 **** current_container.AddDelegate (del); RootContext.Tree.RecordDecl (name.GetName (true), del); ! } | opt_attributes opt_modifiers --- 2062,2068 ---- current_container.AddDelegate (del); RootContext.Tree.RecordDecl (name.GetName (true), del); ! del.Documentation = lexer.GetDocs(); ! //lexer.SaveDocument(); ! } | opt_attributes opt_modifiers *************** *** 2025,2028 **** --- 2080,2085 ---- current_container.AddDelegate (del); RootContext.Tree.RecordDecl (name.GetName (true), del); + del.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } ; *************** *** 3008,3011 **** --- 3065,3070 ---- current_container = current_class; RootContext.Tree.RecordDecl (name.GetName (true), current_class); + current_class.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } } *************** *** 4105,4108 **** --- 4164,4173 ---- public Attributes OptAttributes; + /// <summary> + /// Holds the doc-comments. + /// </summary> + /// <remarks>master's hack</remarks> + public string Documentation; + public VariableDeclaration (string id, object eoai, Location l, Attributes opt_attrs) { Index: cs-tokenizer.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/cs-tokenizer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cs-tokenizer.cs 29 Oct 2004 14:16:19 -0000 1.1 --- cs-tokenizer.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 55,58 **** --- 55,89 ---- static Hashtable tokenValues; + //---------------------------------------------- + // Adding support for documentation. + // Modified by Gaurav Vaish + // master's hack + //---------------------------------------------- + + #region Modification1 + + private string commentString = ""; + private bool isCollectingDocs = true; + + public void SaveDocument() + { + commentString = ""; + isCollectingDocs = true; + } + + public void StopCollectingDocs() + { + isCollectingDocs = false; + } + + public string GetDocs() + { + string retVal = commentString.Trim(); + SaveDocument(); + return retVal; + } + + #endregion + private static Hashtable TokenValueName { *************** *** 1858,1869 **** // Handle double-slash comments. if (c == '/'){ int d = peekChar (); ! if (d == '/'){ getChar (); while ((d = getChar ()) != -1 && (d != '\n') && d != '\r') col++; if (d == '\n'){ line++; ref_line++; --- 1889,1929 ---- // Handle double-slash comments. + #region Modification2 if (c == '/'){ int d = peekChar (); ! // master's hack ! int afterComment = 0; ! if (d == '/'){ getChar (); + // master's hack + if(isCollectingDocs) + { + commentString += "//"; + } while ((d = getChar ()) != -1 && (d != '\n') && d != '\r') + { + // master's hack + if(isCollectingDocs) + { + commentString += (char)d; + } col++; + } if (d == '\n'){ + //master's hack + if(isCollectingDocs) + { + commentString += '\n'; + } + // master's hack + ///* + afterComment = peekChar(); + if(afterComment == '\r' || afterComment=='\n') + { + //Console.WriteLine("Delimiting // comment. \n\"" + commentString + "\""); + commentString = ""; + } + //*/ line++; ref_line++; *************** *** 1876,1881 **** --- 1936,1957 ---- getChar (); + // master's hack + if(isCollectingDocs) + commentString += "/*"; + while ((d = getChar ()) != -1){ + // master's hack + if(isCollectingDocs) + { + commentString += (char)d; + } if (d == '*' && peekChar () == '/'){ + // master's hack + if(isCollectingDocs) + { + commentString += "/"; + //Console.WriteLine("Stop of /**/ comment. \n\"" + commentString + "\""); + } + StopCollectingDocs(); getChar (); col++; *************** *** 1889,1892 **** --- 1965,1977 ---- tokens_seen = false; } + // master's hack + /* + afterComment = peekChar(); + if(afterComment == '\r' || afterComment=='\n') + { + Console.WriteLine("Delimiting /* comment. \n\"" + commentString + "\""); + commentString = ""; + } + //*/ } continue; *************** *** 1894,1897 **** --- 1979,1983 ---- goto is_punct_label; } + #endregion Index: driver.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/driver.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** driver.cs 29 Oct 2004 14:16:19 -0000 1.1 --- driver.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 9,12 **** --- 9,14 ---- // + using MCSDoc; + namespace Mono.CSharp { *************** *** 1566,1569 **** --- 1568,1580 ---- } + TypeContainer root = RootContext.Tree.Types; + Console.WriteLine("Root type: " + root.GetType()); + + MCSDocUtils.ManageAttributeTypes(root.Types); + + MCSDocUtils.ManageTypeContainer(root); + Console.WriteLine(); + + if (RootContext.VerifyClsCompliance) { CodeGen.Assembly.ResolveClsCompliance (); Index: ecore.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/ecore.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ecore.cs 29 Oct 2004 14:16:19 -0000 1.1 --- ecore.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 158,161 **** --- 158,167 ---- protected Location loc; + /// <summary> + /// Holds the doc-comments. + /// </summary> + /// <remarks>master's hack</remarks> + public string Documentation; + public Type Type { get { Index: parameter.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/parameter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** parameter.cs 29 Oct 2004 14:16:20 -0000 1.1 --- parameter.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 527,531 **** /// /// Note that the returned type will not contain any dereference in this ! /// case (ie, you get "int" for a ref int instead of "int&" /// </summary> public Type GetParameterInfo (EmitContext ec, int idx, out Parameter.Modifier mod) --- 527,531 ---- /// /// Note that the returned type will not contain any dereference in this ! /// case (ie, you get "int" for a ref int instead of "int&") /// </summary> public Type GetParameterInfo (EmitContext ec, int idx, out Parameter.Modifier mod) Index: statement.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/statement.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** statement.cs 29 Oct 2004 14:16:20 -0000 1.1 --- statement.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 26,30 **** /// Resolves the statement, true means that all sub-statements /// did resolve ok. ! // </summary> public virtual bool Resolve (EmitContext ec) { --- 26,30 ---- /// Resolves the statement, true means that all sub-statements /// did resolve ok. ! /// </summary> public virtual bool Resolve (EmitContext ec) { Index: support.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/support.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** support.cs 29 Oct 2004 14:16:20 -0000 1.1 --- support.cs 30 Oct 2004 14:09:08 -0000 1.2 *************** *** 368,375 **** int preamble_size; ! /// <remarks> /// The difference to the StreamReader's BaseStream.Position is that this one is reliable; ie. it ! // always reports the correct position and if it's modified, it also takes care of the buffered data. ! /// </remarks> public int Position { get { --- 368,375 ---- int preamble_size; ! /// <summary> /// The difference to the StreamReader's BaseStream.Position is that this one is reliable; ie. it ! /// always reports the correct position and if it's modified, it also takes care of the buffered data. ! /// </summary> public int Position { get { |
From: <mas...@us...> - 2004-10-30 13:57:33
|
Update of /cvsroot/csdoc/csdoc/src/mcsdoc/mcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7927 Modified Files: .cvsignore ChangeLog.mcsdoc makefile Removed Files: mcs.exe.config mcs.exe.sources Log Message: 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * mcs.exe.sources, * mcs.exe.config : Remove this also. * .cvsignore : Ignore mcsdoc.* files also. * makefile : PROGRAM is mcsdoc.exe Index: .cvsignore =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 29 Oct 2004 14:16:19 -0000 1.1 --- .cvsignore 30 Oct 2004 13:57:16 -0000 1.2 *************** *** 15,17 **** semantic.cache y.output ! mcs.exe \ No newline at end of file --- 15,18 ---- semantic.cache y.output ! *.exe ! mcsdoc.xml \ No newline at end of file Index: ChangeLog.mcsdoc =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/ChangeLog.mcsdoc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog.mcsdoc 30 Oct 2004 13:53:55 -0000 1.3 --- ChangeLog.mcsdoc 30 Oct 2004 13:57:16 -0000 1.4 *************** *** 3,6 **** --- 3,13 ---- 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * mcs.exe.sources, + * mcs.exe.config : Remove this also. + * .cvsignore : Ignore mcsdoc.* files also. + * makefile : PROGRAM is mcsdoc.exe + + 2004-10-30 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * genericparser.cs, * interface.cs, Index: makefile =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/mcsdoc/mcs/makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** makefile 29 Oct 2004 14:16:20 -0000 1.1 --- makefile 30 Oct 2004 13:57:16 -0000 1.2 *************** *** 14,18 **** TODO ! PROGRAM = mcs.exe PROGRAM_COMPILE = $(BOOT_COMPILE) PROGRAM_INSTALL_DIR = $(prefix)/lib/mono/1.0 --- 14,19 ---- TODO ! #PROGRAM = mcs.exe ! PROGRAM = mcsdoc.exe PROGRAM_COMPILE = $(BOOT_COMPILE) PROGRAM_INSTALL_DIR = $(prefix)/lib/mono/1.0 --- mcs.exe.config DELETED --- --- mcs.exe.sources DELETED --- |