[csdoc-patches] CVS: csdoc/src/csdoc/MCSDoc ChangeLog,1.13,1.14 ClassDoc.cs,1.4,1.5 DocTreeGenerator
Status: Planning
Brought to you by:
mastergaurav
|
From: Gaurav V. <mas...@us...> - 2003-04-02 10:22:24
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc
In directory sc8-pr-cvs1:/tmp/cvs-serv16460
Modified Files:
ChangeLog ClassDoc.cs DocTreeGenerator.cs NamespaceDoc.cs
RootDoc.cs
Log Message:
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.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ChangeLog 1 Apr 2003 16:53:47 -0000 1.13
+++ ChangeLog 2 Apr 2003 10:22:20 -0000 1.14
@@ -1,4 +1,13 @@
+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,
Index: ClassDoc.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ClassDoc.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ClassDoc.cs 28 Mar 2003 15:30:22 -0000 1.4
+++ ClassDoc.cs 2 Apr 2003 10:22:20 -0000 1.5
@@ -13,7 +13,7 @@
namespace MCSDoc
{
- internal class ClassDoc : IClassDoc
+ internal class ClassDoc : IClassDoc, IComparable
{
private Class klass;
private string name;
@@ -55,6 +55,14 @@
}
}
+ public string NamespaceName
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
public string Name
{
get
@@ -109,6 +117,23 @@
{
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");
}
}
}
Index: DocTreeGenerator.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/DocTreeGenerator.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DocTreeGenerator.cs 1 Apr 2003 16:36:47 -0000 1.6
+++ DocTreeGenerator.cs 2 Apr 2003 10:22:20 -0000 1.7
@@ -40,10 +40,11 @@
private void ParseAndGenerate()
{
//rootDoc.Parse(root);
- ParseContainers(root.Types);
- ParseDelegates(root.Delegates);
- ParseEnums(root.Enums);
- ParseInterfaces(root.Interfaces);
+ //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?
@@ -51,6 +52,18 @@
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)
@@ -210,11 +223,6 @@
allInterfaces.Add(id);
}
}
- }
-
- private void GenerateTree()
- {
- throw new NotImplementedException();
}
public IRootDoc RootDoc
Index: NamespaceDoc.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/NamespaceDoc.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NamespaceDoc.cs 1 Apr 2003 16:53:47 -0000 1.3
+++ NamespaceDoc.cs 2 Apr 2003 10:22:20 -0000 1.4
@@ -37,6 +37,10 @@
/// <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();
@@ -47,9 +51,8 @@
foreach(NamespaceDoc nd in namespaces)
{
name = nd.Name;
- // is this namespace is not added,
- // check for its parent ones
bool isAdded = IsNamespaceAdded(name, retVal);
+ /*
if(!isAdded)
{
subNames = GetSubnames(name);
@@ -64,13 +67,19 @@
}
}
}
+ */
+ AddNamespaceInHierarchy(nd, retVal);
throw new NotImplementedException();
- //if(!isAdded)
- // AddNamespaceInHierarchy(name,
}
throw new NotImplementedException();
}
+ }
+
+ private static void AddNamespaceInHierarchy(NamespaceDoc doc,
+ ArrayList docList)
+ {
+ throw new NotImplementedException();
}
private static bool IsNamespaceAdded(string name, ArrayList namespaces)
Index: RootDoc.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/RootDoc.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- RootDoc.cs 1 Apr 2003 16:04:09 -0000 1.7
+++ RootDoc.cs 2 Apr 2003 10:22:20 -0000 1.8
@@ -29,6 +29,11 @@
//Parse(root);
}
+ public RootDoc()
+ {
+ //Do nothing!
+ }
+
private void Parse(TypeContainer root)
{
PopulateContainers(root.Types);
|