|
||||||
SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC |
::xotcl::Object
Variables | |||
Name | Default Value | Class | Comment |
classList |
::xodocument::HtmlDocument | ||
namespaces |
::xodocument::HtmlDocument | ||
navbar |
::xodocument::HtmlDocument | ||
project |
::xodocument::HtmlDocument | ||
stylesheet |
::xodocument::HtmlDocument | ||
tclformatter |
::xodocument::HtmlDocument |
Methods from ::xotcl::Object |
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
|
Instproc Detail |
data
::xodocument::HtmlDocument instproc cleanUpComment {data} { regsub -all {\&} "$data" {\&} data regsub -all < "$data" {\<} data regsub -all > "$data" {\>} data set newData "" set lines [ split $data "\n" ] while { 1 } { if { [ llength $lines ] == 0 } { break } set firstLine [ lindex $lines 0 ] if [ my isSpaces $firstLine ] { set lines [ lrange $lines 1 end ] } else { break } } set firstLine [ lindex $lines 0 ] set spaces 0 foreach char [ split $firstLine "" ] { if [ string is space $char ] { incr spaces } else { break } } incr spaces -1 foreach line $lines { set whitespace [ string range $line 0 $spaces ] if [ my isSpaces $whitespace ] { append newData [ string range $line $spaces end ] append newData "\n" } else { append newData $line append newData "\n" } } return [ string trim $newData ] }
data
::xodocument::HtmlDocument instproc cleanUpDataForHtml {data} { return [ [my tclformatter ] formatTcl $data ] }
link
::xodocument::HtmlDocument instproc cleanUpLink {link} { regsub -all {::} "$link" {_} link regsub -all {#} "$link" {_} link return $link }
dir
::xodocument::HtmlDocument instproc generateDoc {dir} { set dir [ my getAbsoluteDir $dir ] if { ![ file exists $dir ] } { file mkdir $dir } if { ![ file isdirectory $dir ] } { error [ ::xoexception::Exception new "$dir is not a directory" ] } set stylesheet [ my stylesheet ] if { [ file exists $stylesheet ] } { file copy -force $stylesheet [ file join $dir $stylesheet ] } set classList "" foreach namespace [ my namespaces ] { set classList [ concat $classList [ lsort -unique [ ::xox::ObjectGraph findAllInstances Class $namespace ] ] ] set classList [ concat $classList [ lsort -unique [ ::xox::ObjectGraph findAllInstances Class [ string tolower $namespace ] ] ] ] puts "Finding classes in $namespace" } set classList [ concat [ my classList ] $classList ] set classList [ lsort -unique $classList ] my classList $classList my makeClassIndex $dir $classList set namespaceList {} foreach class $classList { if { ![ Object isclass $class ] } { continue } set namespace [ namespace qualifiers $class ] if { [ lsearch $namespaceList $namespace ] == -1 } { lappend namespaceList $namespace } } set namespaceList [ lsort -unique $namespaceList ] my makeOverview $dir $namespaceList my makeNamespaceIndex $dir $namespaceList foreach namespace $namespaceList { my makeNamespaceSummary $dir $namespace $classList my makeClassIndexPerNamespace $dir $namespace $classList } foreach class $classList { if { ![ Object isclass $class ] } { continue } my makeClassDetail $dir $class puts "Generated doc for $class" } my makeFrames $dir }
dir
::xodocument::HtmlDocument instproc getAbsoluteDir {dir} { if { "[file pathtype $dir]" == "relative" } { set dir [ file join [ pwd ] $dir ] } return $dir }
class
text
target
- optional, default value: _self
anchor
- optional, default value: top
::xodocument::HtmlDocument instproc getClassLinkIfAvail {class text {target _self} {anchor top}} { if { ! [ my isClassAvailable $class ] } { return ${text} } return "<A HREF=\"[ my cleanUpLink $class].html#${anchor}\" TARGET=\"$target\">${text}</A>" }
class
args
::xodocument::HtmlDocument instproc getComment {class args} { set comment [ ::xox::ObjectGraph findFirstComment $class $args ] return [ my cleanUpComment $comment ] }
class
instcommand
::xodocument::HtmlDocument instproc getInstcommandSummary {class instcommand} { return " <B><A HREF=\"#[ my cleanUpLink $instcommand]\">${instcommand}</A></B>" }
class
::xodocument::HtmlDocument instproc getInstcommandsOnly {class} { set instprocs [ $class info instprocs ] set instprocs [ concat $instprocs [ $class info parameter ] ] set instcommandsOnly {} foreach instcommand [ lsort [ $class info instcommands ] ] { if { [ lsearch -exact $instprocs $instcommand ] != -1 } { continue } lappend instcommandsOnly $instcommand } return $instcommandsOnly }
class
instproc
::xodocument::HtmlDocument instproc getInstprocSummary {class instproc} { set instnonposargs "\{[ $class info instnonposargs $instproc ]\}" if { "$instnonposargs" == "\{\}" } { set instnonposargs "" } set instargs "" foreach instarg [ $class info instargs $instproc ] { if [ $class info instdefault $instproc $instarg defaultValue ] { if { "" == "$defaultValue" } { set defaultValue {""} } lappend instargs "$instarg $defaultValue" } else { lappend instargs $instarg } } set instargs "\{$instargs\}" return "<B>[ my getClassLinkIfAvail $class $instproc _self $instproc ]</B>$instnonposargs $instargs" }
class
proc
::xodocument::HtmlDocument instproc getProcSummary {class proc} { set args "\{ [ $class info args $proc ] \} " set nonposargs "\{[ $class info nonposargs $proc ]\}" if { "$nonposargs" == "\{\}" } { set nonposargs "" } return " <B><A HREF=\"#[ my cleanUpLink $proc]\">${proc}</A></B>$nonposargs $args" }
class
args
::xodocument::HtmlDocument instproc getShortComment {class args} { set comment [ ::xox::ObjectGraph findFirstComment $class $args ] return [ my cleanUpComment [ lindex [ split $comment "." ] 0 ] ] }
::xodocument::HtmlDocument instproc init {} { my project "Project Name" my stylesheet "stylesheet.css" my namespaces "::*" my classList "" my tclformatter [ TclHtmlFormatter new ] my navbar [ NavBar new ] }
class
::xodocument::HtmlDocument instproc isClassAvailable {class} { return [ expr { [ lsearch [ my classList ] $class ] != -1 } ] }
string
::xodocument::HtmlDocument instproc isSpaces {string} { return [ expr { "[ string trim $string ]" == "" } ] }
dir
class
::xodocument::HtmlDocument instproc makeClassDetail {dir class} { set file [ open [ file join $dir [ my cleanUpLink $class].html ] w ] my putsHeader [ namespace tail $class ] $file [ my navbar ] selectClass [ my cleanUpLink [ namespace qualifiers $class ] ]-summary.html [ my navbar ] putsNavBar $file puts $file " <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE=\"-1\"> [ namespace qualifiers $class ]</FONT> <BR> Class [ namespace tail $class ]</H2> " my putsClassHeritage $file $class my putsSubclasses $file $class my putsInstMixins $file $class my putsAssociatedTest $file $class puts -nonewline $file " <DL> <DT> Class <b> [ namespace tail $class ] </b> <DT> superclass " set superclasses [ $class info superclass ] foreach superclass $superclasses { puts -nonewline $file "[my getClassLinkIfAvail $superclass $superclass ]," } puts $file "</DL>" puts $file "<pre>" puts $file [ my getComment $class [ namespace tail $class ] ] puts $file "</pre>" my putsParameterSummary $file $class foreach superclass [ $class info heritage ] { my putsParameterInherited $file $superclass } my putsProcSummary $file $class my putsInstprocSummary $file $class foreach superclass [ $class info heritage ] { my putsInstprocInherited $file $superclass } my putsInstcommandSummary $file $class foreach superclass [ $class info heritage ] { my putsInstcommandInherited $file $superclass } my putsInstfilterSummary $file $class foreach superclass [ $class info heritage ] { my putsInstfilterInherited $file $superclass } my putsInstforwardSummary $file $class my putsProcDetail $file $class my putsInstprocDetail $file $class my putsInstcommandDetail $file $class flush $file close $file }
dir
classList
::xodocument::HtmlDocument instproc makeClassIndex {dir classList} { set file [ open [ file join $dir allclasses-frame.html ] w ] my putsHeader "All Classes" $file puts $file " <FONT size=\"+1\" CLASS=\"FrameHeadingFont\"> <B>All Classes</B></FONT> <BR> <TABLE BORDER=\"0\" WIDTH=\"100%\"> <TR> <TD NOWRAP> <FONT CLASS=\"FrameItemFont\"> " foreach class $classList { if { ![ Object isclass $class ] } { continue } puts $file " <A HREF=\"[ my cleanUpLink $class].html\" TARGET=\"classFrame\">$class</A> <BR>" } puts $file " <BR> </FONT></TD> </TR> </TABLE> </BODY> </HTML>" flush $file close $file }
dir
namespace
classList
::xodocument::HtmlDocument instproc makeClassIndexPerNamespace {dir namespace classList} { set file [ open [ file join $dir [ my cleanUpLink $namespace]-frame.html ] w ] set localClassList {} foreach class $classList { if { ![ Object isclass $class ] } { continue } if { "$namespace" == "[ namespace qualifiers $class ]" } { lappend localClassList $class } } set localClassList [ lsort -unique $localClassList ] puts $file " <FONT size=\"+1\" CLASS=\"FrameTitleFont\"> <A HREF=\"[ my cleanUpLink $namespace]-summary.html\" TARGET=\"classFrame\">${namespace}</A></FONT> <TABLE BORDER=\"0\" WIDTH=\"100%\"> <TR> <TD NOWRAP><FONT size=\"+1\" CLASS=\"FrameHeadingFont\"> Classes</FONT> <FONT CLASS=\"FrameItemFont\"> <BR>" foreach class $localClassList { if { ![ Object isclass $class ] } { continue } puts $file " <A HREF=\"[ my cleanUpLink $class ].html\" TARGET=\"classFrame\">[ namespace tail $class ]</A> <BR>" } puts $file " </FONT></TD> </TR> </TABLE>" flush $file close $file }
dir
::xodocument::HtmlDocument instproc makeFrames {dir} { set file [ open [ file join $dir index.html ] w ] puts $file " <FRAMESET cols=\"20%,80%\"> <FRAMESET rows=\"30%,70%\"> <FRAME src=\"overview-frame.html\" name=\"packageListFrame\"> <FRAME src=\"allclasses-frame.html\" name=\"packageFrame\"> </FRAMESET> <FRAME src=\"overview-summary.html\" name=\"classFrame\"> </FRAMESET>" flush $file close $file }
dir
namespaceList
::xodocument::HtmlDocument instproc makeNamespaceIndex {dir namespaceList} { set file [ open [ file join $dir overview-frame.html ] w ] my putsHeader Overview $file puts $file " <TABLE BORDER=\"0\" WIDTH=\"100%\"> <TR> <TD NOWRAP><FONT CLASS=\"FrameItemFont\"><A HREF=\"allclasses-frame.html\" TARGET=\"packageFrame\">All Classes</A></FONT> <P> <FONT size=\"+1\" CLASS=\"FrameHeadingFont\"> Namespaces</FONT> <BR>" foreach namespace $namespaceList { puts $file " <FONT CLASS=\"FrameItemFont\"><A HREF=\"[ my cleanUpLink $namespace]-frame.html\" TARGET=\"packageFrame\">${namespace}</A></FONT> <BR>" } puts $file " <BR> </TD> </TR> </TABLE> <P> " flush $file close $file }
dir
namespace
classList
::xodocument::HtmlDocument instproc makeNamespaceSummary {dir namespace classList} { set file [ open [ file join $dir [ my cleanUpLink $namespace ]-summary.html ] w ] my putsHeader $namespace $file [ my navbar ] selectNamespace [ my navbar ] putsNavBar $file my putsHeader $namespace $file set localClassList {} foreach class $classList { if { ![ Object isclass $class ] } { continue } if { "$namespace" == "[ namespace qualifiers $class ]" } { lappend localClassList $class } } set localClassList [ lsort -unique $localClassList ] puts $file " <HR> <H2> Namespace ${namespace} </H2> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Class Summary</B></FONT></TD> </TR> " foreach class $localClassList { if { ![ Object isclass $class ] } { continue } puts $file " <TR BGCOLOR=\"white\" CLASS=\"[ namespace tail $class ]\"> <TD WIDTH=\"15%\"><B><A HREF=\"[ my cleanUpLink $class].html\">[ namespace tail $class]</A></B></TD> <TD> <b>[ my getShortComment $class [ namespace tail $class ] ]</b></TD> </TR>" } puts $file " </TABLE> <P> <HR> " }
dir
namespaceList
::xodocument::HtmlDocument instproc makeOverview {dir namespaceList} { set file [ open [ file join $dir overview-summary.html ] w ] my putsHeader "Overview" $file [ my navbar ] selectOverview [ my navbar ] putsNavBar $file puts $file " <HR> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Namespace</B></FONT></TD> </TR> " foreach namespace $namespaceList { set packageDescription "" set packageObject "${namespace}::[ namespace tail $namespace ]" if [ Object isobject $packageObject ] { set packageDescription [ my getComment $packageObject [ namespace tail $packageObject ] ] } puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD WIDTH=\"20%\"><B><A HREF=\"[ my cleanUpLink $namespace]-summary.html\">${namespace}</A></B></TD> <TD> $packageDescription</TD> </TR>" } puts $file " </TABLE> <P> <HR>" flush $file close $file }
file
class
::xodocument::HtmlDocument instproc putsAssociatedTest {file class} { set qualifiers [ namespace qualifiers $class ] set mainPackage [ namespace qualifiers $qualifiers ] set name [ namespace tail $class ] set testedName [ string range $name 4 end ] set testClass "${qualifiers}::test::Test${name}" set testedClass "${mainPackage}::${testedName}" #puts "testClass $testClass" #puts "testedClass $testedClass" if { [ Object isclass $testClass ] } { puts -nonewline $file " <DL> <DT><B>Associated Test:</B> <DD>" puts $file "[my getClassLinkIfAvail $testClass $testClass ]" puts $file "</DD> </DL> <HR>" return } elseif { [ Object isclass $testedClass ] } { puts -nonewline $file " <DL> <DT><B>Tested Class:</B> <DD>" puts $file "[my getClassLinkIfAvail $testedClass $testedClass ]" puts $file "</DD> </DL> <HR>" return } else { return } }
file
class
::xodocument::HtmlDocument instproc putsClassHeritage {file class} { puts $file "<b>Heritage:</b><PRE>" set heritage [ $class info heritage ] set length [ llength $heritage ] incr length -1 set brackets 0 set spaces " " for { set loop $length } { $loop >= 0 } { incr loop -1 } { set current [ lindex $heritage $loop ] if { $brackets > 0 } { puts -nonewline $file "$spaces|\n$spaces+--" append spaces " " } puts $file [ my getClassLinkIfAvail $current $current ] incr brackets } puts $file "</PRE>" }
title
file
::xodocument::HtmlDocument instproc putsHeader {title file} { puts $file " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\"http://www.w3.org/TR/REC-html40/loose.dtd\"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by xodocument on [ clock format [ clock seconds ] ] --> <TITLE> $title ([ my project ] API) </TITLE> <LINK REL =\"stylesheet\" TYPE=\"text/css\" HREF=\"[ my stylesheet ]\" TITLE=\"Style\"> </HEAD> <SCRIPT> function asd() { parent.document.title=\"$title ([ my project ] API)\"; } </SCRIPT> <BODY BGCOLOR=\"white\" onload=\"asd();\"> " }
file
class
::xodocument::HtmlDocument instproc putsInstMixins {file class} { if { "" == "[ $class info instmixin ]" } { return } set instmixins [ lsort [ $class info instmixin ] ] if { [ llength $instmixins ] == 0 } { return } puts -nonewline $file " <DL> <DT><B>All Instmixins:</B> <DD>" foreach instmixin $instmixins { puts -nonewline $file "<A HREF=\"[ my cleanUpLink $instmixin].html\">${instmixin}</A>, " } puts $file "</DD> </DL> <HR>" }
file
class
::xodocument::HtmlDocument instproc putsInstcommandDetail {file class} { if { [ llength [ my getInstcommandsOnly $class ] ] == 0 } { return } puts $file " <!-- ============ INSTCOMMAND DETAIL ========== --> <A NAME=\"instcommand_detail\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=1><FONT SIZE=\"+2\"> <B>Instcommand Detail</B></FONT></TD> </TR> </TABLE> " foreach instcommand [ my getInstcommandsOnly $class ] { puts $file " <A NAME=\"[ my cleanUpLink $instcommand]\"><!-- --></A><H3> ${instcommand}</H3> <PRE> <font color=\"green\"> [ my getComment $class $instcommand ] </font> ${class} instcommand [ my getInstcommandSummary $class $instcommand ] </PRE> <HR> " } }
file
class
::xodocument::HtmlDocument instproc putsInstcommandInherited {file class} { if { [ llength [ my getInstcommandsOnly $class ] ] == 0 } { return } puts -nonewline $file " <A NAME=\"instcommands_inherited_from_class_[ my cleanUpLink $class]\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\"> <TD><B>Instcommands inherited from class [ my getClassLinkIfAvail $class $class ] </B></TD> </TR> <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE>" foreach instcommand [ my getInstcommandsOnly $class ] { puts -nonewline $file " [ my getClassLinkIfAvail $class $instcommand _self $instcommand ], " } puts $file " </CODE></TD> </TR> </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstcommandSummary {file class} { if { "" == "[ my getInstcommandsOnly $class ]" } { return } puts $file " <!-- =========== Instcommand SUMMARY =========== --> <A NAME=\"instcommand_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Instcommand Summary</B></FONT></TD> </TR> " foreach instcommand [ my getInstcommandsOnly $class ] { puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE> [ my getInstcommandSummary $class $instcommand ] </CODE> <br/> [ my getShortComment $class $instcommand ] </TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstfilterInherited {file class} { if { [ llength [ $class info instfilter ] ] == 0 } { return } puts -nonewline $file " <A NAME=\"instfilters_inherited_from_class_[ my cleanUpLink $class]\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\"> <TD><B>Instfilters inherited from class [ my getClassLinkIfAvail $class $class ] </B></TD> </TR> <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE>" foreach instfilter [ lsort [ $class info instfilter ] ] { puts -nonewline $file " [ my getClassLinkIfAvail $class $instfilter _self $instfilter ], " } puts $file " </CODE></TD> </TR> </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstfilterSummary {file class} { if { "" == "[ $class info instfilter ]" } { return } puts $file " <!-- =========== Instfilter SUMMARY =========== --> <A NAME=\"instfilter_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Instfilter Summary</B></FONT></TD> </TR> " foreach instfilter [ lsort [ $class info instfilter -guards ] ] { puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE><B><A HREF=\"#[ my cleanUpLink $instfilter]\">${instfilter}</A></B></CODE> </TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstforwardSummary {file class} { if { "" == "[ $class info instforward ]" } { return } puts $file " <!-- =========== Instforward SUMMARY =========== --> <A NAME=\"instforward_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Instforward Summary</B></FONT></TD> </TR> " foreach instforward [ lsort [ $class info instforward ] ] { puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE><B><A HREF=\"#[ my cleanUpLink $instforward]\">${instforward}</A></B></CODE> </TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstprocDetail {file class} { if { "" == "[ $class info instprocs ]" } { return } puts $file " <!-- ============ INSTPROC DETAIL ========== --> <A NAME=\"instproc_detail\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=1><FONT SIZE=\"+2\"> <B>Instproc Detail</B></FONT></TD> </TR> </TABLE> " foreach instproc [ lsort [ $class info instprocs ] ] { puts $file " <A NAME=\"[ my cleanUpLink $instproc]\"><!-- --></A><H3> ${instproc}</H3> <dl> <dt> <b> Description: </b> </dt><dd><PRE><font color=\"green\"> [ my getComment $class $instproc ]</font></PRE></dd>" if { "" != [ $class info instargs $instproc ] } { puts $file "<dt> <b> Arguments: </b> </dt>" puts $file "<dd><ul>" foreach instarg [ $class info instargs $instproc ] { if [ $class info instdefault $instproc $instarg defaultValue ] { if { "" == "$defaultValue" } { set defaultValue {""} } puts $file "<li> <code>$instarg</code> - optional, default value: <code>$defaultValue</code> </li>" } else { puts $file "<li><code>$instarg</code> </li>" } } puts $file "</ul></dd>" } set overridenClass "" foreach superclass [ $class info superclass ] { set overridenClass [ ::xox::ObjectGraph findFirstImplementation $superclass $instproc ] if { "" != "$overridenClass" } { break } } if { "" != "$overridenClass" } { puts $file "<dt> <b> Overrides: </b> </dt>" puts $file "<dd>[my getClassLinkIfAvail $overridenClass $instproc _self $instproc ] in [my getClassLinkIfAvail $overridenClass $overridenClass ]</dd>" } puts $file "<dt> <b> Code: </b> </dt> <dd><PRE> <b> ${class} instproc [ my getInstprocSummary $class $instproc ] </b> \{ [ my cleanUpDataForHtml [ $class info instbody $instproc ] ] \} </PRE></dd> <HR></dl> " } }
file
class
::xodocument::HtmlDocument instproc putsInstprocInherited {file class} { if { [ llength [ $class info instprocs ] ] == 0 } { return } puts -nonewline $file " <A NAME=\"instprocs_inherited_from_class_[ my cleanUpLink $class]\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\"> <TD><B>Instprocs inherited from class [ my getClassLinkIfAvail $class $class ] </B></TD> </TR> <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE>" foreach instproc [ lsort [ $class info instprocs ] ] { puts -nonewline $file " [ my getClassLinkIfAvail $class $instproc _self $instproc ], " } puts $file " </CODE></TD> </TR> </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsInstprocSummary {file class} { if { "" == "[ $class info instprocs ]" } { return } puts $file " <!-- =========== Instproc SUMMARY =========== --> <A NAME=\"instproc_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Instproc Summary</B></FONT></TD> </TR> " foreach instproc [ lsort [ $class info instprocs ] ] { puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE> [ my getInstprocSummary $class $instproc ] </CODE> <br/> [ my getShortComment $class $instproc ] </TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsParameterInherited {file class} { if { [ llength [ $class info parameter ] ] == 0 } { return } puts -nonewline $file " <A NAME=\"parameters_inherited_from_class_[ my cleanUpLink $class]\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\"> <TD><B>Parameters inherited from class [ my getClassLinkIfAvail $class $class ] </B></TD> </TR> <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE>" foreach parameterValue [ $class info parameter ] { set parameter [ lindex $parameterValue 0 ] puts -nonewline $file " [ my getClassLinkIfAvail $class $parameter _self $parameter ], " } puts $file " </CODE></TD> </TR> </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsParameterSummary {file class} { if { "" == "[ $class info parameter ]" } { return } puts $file " <!-- =========== Parameter SUMMARY =========== --> <A NAME=\"parameter_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=3><FONT SIZE=\"+2\"> <B>Parameter Summary</B></FONT></TD> </TR> " foreach parameterDefault [ $class info parameter ] { set parameter [ lindex $parameterDefault 0 ] set defaultValue [ lindex $parameterDefault 1 ] if { "" == "$defaultValue" } { if { [ llength $parameterDefault ] == 2 } { set defaultValue {""} } } puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE><B><A HREF=\"#[ my cleanUpLink $parameter]\">${parameter}</A></B></CODE> </TD><TD> $defaultValue</TD><TD> [ my getComment $class $parameter ]</TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsProcDetail {file class} { if { "" == "[ $class info procs ]" } { return } puts $file " <!-- ============ PROC DETAIL ========== --> <A NAME=\"proc_detail\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=1><FONT SIZE=\"+2\"> <B>Proc Detail</B></FONT></TD> </TR> </TABLE> " foreach proc [ lsort [ $class info procs ] ] { puts $file " <A NAME=\"[ my cleanUpLink $proc]\"><!-- --></A><H3> ${proc}</H3> <dl> <dt> <b> Description: </b> </dt><dd><PRE><font color=\"green\"> [ my getComment $class $proc ]</font></PRE></dd>" if { "" != [ $class info args $proc ] } { puts $file "<dt> <b> Arguments: </b> </dt>" puts $file "<dd><ul>" foreach arg [ $class info args $proc ] { if [ $class info default $proc $arg defaultValue ] { if { "" == "$defaultValue" } { set defaultValue {""} } puts $file "<li> <code>$arg</code> - optional, default value: <code>$defaultValue</code> </li>" } else { puts $file "<li><code>$arg</code> </li>" } } puts $file "</ul></dd>" } set overridenClass "" foreach superclass [ $class info superclass ] { set overridenClass [ ::xox::ObjectGraph findFirstImplementation $superclass $proc ] if { "" != "$overridenClass" } { break } } if { "" != "$overridenClass" } { puts $file "<dt> <b> Overrides: </b> </dt>" puts $file "<dd>[my getClassLinkIfAvail $overridenClass $proc _self $proc ] in [my getClassLinkIfAvail $overridenClass $overridenClass ]</dd>" } puts $file "<dt> <b> Code: </b> </dt> <dd><PRE> <b> ${class} proc [ my getProcSummary $class $proc ] </b> \{ [ my cleanUpDataForHtml [ $class info body $proc ] ] \} </PRE></dd> <HR></dl> " } }
file
class
::xodocument::HtmlDocument instproc putsProcSummary {file class} { if { "" == "[ $class info procs ]" } { return } puts $file " <!-- =========== PROC SUMMARY =========== --> <A NAME=\"proc_summary\"><!-- --></A> <TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\"> <TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\"> <TD COLSPAN=2><FONT SIZE=\"+2\"> <B>Proc Summary</B></FONT></TD> </TR> " foreach proc [ lsort [ $class info procs ] ] { puts $file " <TR BGCOLOR=\"white\" CLASS=\"TableRowColor\"> <TD><CODE> [ my getProcSummary $class $proc ] </CODE> <br/> [ my getShortComment $class $proc ] </TD> </TR> " } puts $file " </TABLE> " }
file
class
::xodocument::HtmlDocument instproc putsSubclasses {file class} { set subclasses [ lsort [ $class info subclass ] ] if { [ llength $subclasses ] == 0 } { return } puts -nonewline $file " <DL> <DT><B>Direct Known Subclasses:</B> <DD>" foreach subclass $subclasses { puts -nonewline $file "[ my getClassLinkIfAvail $subclass $subclass ], " } puts $file "</DD> </DL> <HR>" }