Logo Search packages:      
Sourcecode: ndoc version File versions  Download package

string NDoc::Documenter::LinearHtml::LinearHtmlDocumenter::MakeHtmlTypeDeclaration ( XPathNavigator  nav  )  [inline, private]

Make a string for a Type declaration, such as "public class Foo : IComparable".

Parameters:
nav Navigator to the Type's node.
Returns:
The declaration string.

Definition at line 1658 of file LinearHtmlDocumenter.cs.

            {
                  string nodeName = nav.GetAttribute("name", "");
                  string nodeType = nav.LocalName;
                  string typeAccess = nav.GetAttribute("access", "");
                  string baseType = nav.GetAttribute("baseType", "");
                  string abstractString = nav.GetAttribute("abstract", "");
                  if (abstractString.Length == 0) abstractString = " ";
                  else if (abstractString.Equals("true")) abstractString = " abstract ";

                  // put in declaration
                  string lcTypeAccess = ToAccessDeclaration(typeAccess);
                  string declarationString = lcTypeAccess + abstractString + nodeType + " " + nodeName;
                  if (baseType.Length > 0) declarationString += " : " + baseType;

                  // add interfaces to declaration string
                  ArrayList implKids = GetChildren(nav, "implements");
                  if (implKids.Count > 0)
                  {
                        // add appropriate separator
                        if (baseType.Length == 0) declarationString += " : ";
                        else declarationString += ", ";

                        bool first = true;
                        foreach(XPathNavigator n3 in implKids)
                        {
                              if (!first) declarationString += ", ";
                              first = false;
                              declarationString += n3.GetAttribute("type", "");
                        }
                  }

                  return(declarationString);
            }


Generated by  Doxygen 1.6.0   Back to index