diff --git a/HowTos/NewPacket/Mainpage.dox b/HowTos/NewPacket/Mainpage.dox index 8769831a388e02a250f774a5b5fb10ebca61ef68..436a4286bfe05d98b217bc8d9c0c50a7d3f0a271 100644 --- a/HowTos/NewPacket/Mainpage.dox +++ b/HowTos/NewPacket/Mainpage.dox @@ -405,7 +405,8 @@ senf::PacketTypeMixin. senf::PacketTypeBase must be inherited by every packet type class. the senf::PacketTypeMixin provides default implementations for some members which are useful for most kinds of packets. If a packet type is very complex and these defaults don't work, the mixin - class can and should be left out. + class can and should be left out. More on this (what the default members do exactly and when the + mixin can be used) can be found in the senf::PacketTypeMixin documentation. Of the typedefs, only \a parser is mandatory. It defines the packet parser to use to interpret this type of packet. \a mixin and \a packet are defined to simplify the following @@ -626,10 +627,12 @@ \endcode We have added an additional private bitfield \a reserved0_5bits_() and we made the \a version_() - field private since we do not want the user to change the value. We could have used a read-only - field in this special case (since the valid value is 0) but generally in a case like this since - the field will be initialized by the parser (see next section on how). the field should be - private with an additional public read-only accessor. + field private since we do not want the user to change the value (0 is the only valid value, any + other value is not supported by this parser anyways). In this special case, a read-only field + would do. But more generally, if there are fields which must have a fixed value, they must be + defined as private fields so they can be initialized by the parser to their correct value (see + next section on how). An additional public read-only accessor allows users of the parser to read + out the value (but not change it). We will now add two additional simple members to the parser diff --git a/PPI/Connectors.hh b/PPI/Connectors.hh index 68a0ea4cc909f2883f2c27a20b0b70480fc568fc..a69c3d8f7bda027377a5349053be9d63ee8231e8 100644 --- a/PPI/Connectors.hh +++ b/PPI/Connectors.hh @@ -479,6 +479,8 @@ namespace connector { #else /** \brief Connector actively reading packets + + \tparam PacketType Type of packet to read. Defaults to senf::Packet The ActiveInput connector template reads data actively from a connected module. This class is completely implemented via it's base-class, GenericActiveInput, the only difference is @@ -500,6 +502,8 @@ namespace connector { /** \brief Connector passively receiving packets + \tparam PacketType Type of packet to read. Defaults to senf::Packet + The PassiveInput connector template receives packets sent to it from a connected module. This class is completely implemented via it's base-class, GenericPassiveInput, the only difference is that read packets are returned as \a PacketType instead of generic @@ -521,6 +525,8 @@ namespace connector { /** \brief Connector actively sending packets + \tparam PacketType Type of packet to send. Defaults to senf::Packet + The ActiveOutput connector template sends data actively to a connected module. This class is completely implemented via it's base-class, GenericActiveOutput, the only difference is that it only sends packets of type \a PacketType. @@ -538,6 +544,8 @@ namespace connector { /** \brief Connector passively providing packets + \tparam PacketType Type of packet to send. Defaults to senf::Packet + The PassiveOutput connector template provides data passively to a connected module whenever signaled. This class is completely implemented via it's base-class, GenericPassiveOutput, the only difference is that it only sends packets of type \a PacketType. diff --git a/PPI/Mainpage.dox b/PPI/Mainpage.dox index 2491f501ada326031939215adb0743e7bbb5fa83..17aa545a3c12290b5384313c0f1ea155013bd776 100644 --- a/PPI/Mainpage.dox +++ b/PPI/Mainpage.dox @@ -461,7 +461,28 @@ \section ppi_classdiagram Class Diagram - \image html classes.png + <div class="diamap" name="classes"> + <span coords="652,428,796,455">\ref senf::ppi::connector::PassiveConnector</span> + <span coords="198,381,316,408">\ref senf::ppi::EventManager</span> + <span coords="462,543,571,570">\ref senf::ppi::connector::ActiveOutput</span> + <span coords="468,494,564,521">\ref senf::ppi::connector::ActiveInput</span> + <span coords="414,36,505,63">\ref senf::ppi::RouteBase</span> + <span coords="432,325,529,379">\ref senf::ppi::Route</span> + <span coords="194,154,319,181">\ref (some module)</span> + <span coords="19,293,252,333">\ref senf::ppi::EventImplementation</span> + <span coords="225,36,289,63">\ref senf::ppi::module::Module</span> + <span coords="309,331,397,358">\ref senf::ppi::connector::Connector</span> + <span coords="597,543,717,570">\ref senf::ppi::connector::PassiveOutput</span> + <span coords="66,432,210,459">\ref senf::ppi::detail::EventBindingBase</span> + <span coords="378,428,505,455">\ref senf::ppi::connector::InputConnector</span> + <span coords="491,124,694,210">\ref senf::ppi::RouteImplementation</span> + <span coords="283,464,423,491">\ref senf::ppi::connector::OutputConnector</span> + <span coords="512,428,645,455">\ref senf::ppi::connector::ActiveConnector</span> + <span coords="85,487,259,527">\ref senf::ppi::detail::EventBinding</span> + <span coords="39,216,170,243">\ref senf::ppi::EventDescriptor</span> + <span coords="604,494,710,521">\ref senf::ppi::connector::PassiveInput</span> + </div> + \htmlonly <img src="classes.png" border="0" alt="classes" usemap="#classes"> \endhtmlonly */ diff --git a/Socket/FileHandle.hh b/Socket/FileHandle.hh index 5b0e34db74cb449611fa9a2207078d75bff35de9..f5786355ec72cd15c2ea17fa2e206ab5e09009f5 100644 --- a/Socket/FileHandle.hh +++ b/Socket/FileHandle.hh @@ -26,19 +26,15 @@ /** \defgroup handle_group The Handle Hierarchy - \htmlonly - <map name="FhHierarchy"> - <area shape="rect" alt="FileHandle" href="classsenf_1_1FileHandle.html" title="FileHandle" coords="247,1,345,27" /> - <area shape="rect" alt="SocketHandle" href="classsenf_1_1SocketHandle.html" title="SocketHandle" coords="235,61,355,87" /> - <area shape="rect" alt="ClientSocketHandle" href="classsenf_1_1ClientSocketHandle.html" title="ClientSocketHandle" coords="32,140,198,167" /> - <area shape="rect" alt="ServerSocketHandle" href="classsenf_1_1ServerSocketHandle.html" title="ServerSocketHandle" coords="386,140,558,168" /> - <area shape="rect" alt="ProtocolServerSocketHandle" href="classsenf_1_1ProtocolServerSocketHandle.html" title="ProtocolServerSocketHandle" coords="354,202,590,228" /> - <area shape="rect" alt="ProtocolClientSocketHandle" href="classsenf_1_1ProtocolClientSocketHandle.html" title="ProtocolClientSocketHandle" coords="1,202,230,228" /> - </map> - <center> - <img src="FhHierarchy.png" border="0" alt="FhHierarchy" usemap="#FhHierarchy"> - </center> - \endhtmlonly + <div class="diamap" name="FhHierarchy"> + <span coords="233,47,438,89">\ref SocketHandle</span> + <span coords="32,126,281,168">\ref ClientSocketHandle</span> + <span coords="0,187,326,229">\ref ProtocolClientSocketHandle</span> + <span coords="350,187,684,229">\ref ProtocolServerSocketHandle</span> + <span coords="243,0,343,28">\ref FileHandle</span> + <span coords="382,126,638,168">\ref ServerSocketHandle</span> + </div> + \htmlonly <img src="FhHierarchy.png" border="0" alt="FhHierarchy" usemap="#FhHierarchy"> \endhtmlonly The senf::FileHandle class is the base of a hierarchy of socket handle classes (realized as templates). These classes provide an interface to the complete socket API. While going down the diff --git a/Socket/Mainpage.dox b/Socket/Mainpage.dox index c473505cfeaef7de6a265afeb0592374e76b0545..9a0c847f5df7c57349bf1ec7a4c3e286ab8d132a 100644 --- a/Socket/Mainpage.dox +++ b/Socket/Mainpage.dox @@ -247,7 +247,48 @@ namespace senf { \section class_diagram Class Diagram - \image html SocketLibrary-classes.png + <div class="diamap" name="SocketLibrary-classes"> + <span coords="472,667,559,689">\ref IPv4Protocol</span> + <span coords="29,773,139,794">\ref WritePolicyBase</span> + <span coords="97,939,238,960">\ref SocketBufferingPolicy</span> + <span coords="97,390,223,411">\ref NoAddressingPolicy</span> + <span coords="97,736,217,758">\ref NotReadablePolicy</span> + <span coords="418,609,613,631">\ref AdressableBSDSocketProtocol</span> + <span coords="18,895,153,917">\ref BufferingPolicyBase</span> + <span coords="22,426,148,447">\ref FramingPolicyBase</span> + <span coords="409,0,495,36">\ref FileBody</span> + <span coords="97,469,249,491">\ref DatagramFramingPolicy</span> + <span coords="97,317,240,339">\ref INet6AddressingPolicy</span> + <span coords="453,544,578,566">\ref BSDSocketProtocol</span> + <span coords="97,281,240,303">\ref INet4AddressingPolicy</span> + <span coords="452,177,706,209">\ref ProtocolServerSocketHandle</span> + <span coords="412,259,486,281">\ref PolicyBase</span> + <span coords="474,768,557,790">\ref TCPProtocol</span> + <span coords="97,700,197,722">\ref ReadablePolicy</span> + <span coords="342,249,654,411">\ref SocketPolicy</span> + <span coords="0,541,173,563">\ref CommunicationPolicyBase</span> + <span coords="640,859,736,881">\ref TCPv6Protocol</span> + <span coords="353,428,453,465">\ref SocketProtocol</span> + <span coords="97,585,297,606">\ref ConnectedCommunicationPolicy</span> + <span coords="172,177,420,209">\ref ProtocolClientSocketHandle</span> + <span coords="472,718,559,739">\ref IPv6Protocol</span> + <span coords="97,816,192,838">\ref WritablePolicy</span> + <span coords="383,62,520,98">\ref SocketBody</span> + <span coords="698,888,798,910">\ref PacketProtocol</span> + <span coords="97,852,213,874">\ref NotWritablePolicy</span> + <span coords="31,657,138,679">\ref ReadPolicyBase</span> + <span coords="213,60,369,91">\ref SocketHandle</span> + <span coords="197,126,385,158">\ref ClientSocketHandle</span> + <span coords="97,621,311,642">\ref UnconnectedCommunicationPolicy</span> + <span coords="567,480,786,526">\ref ConcreteSocketProtocol</span> + <span coords="582,830,678,852">\ref TCPv4Protocol</span> + <span coords="97,505,234,527">\ref StreamFramingPolicy</span> + <span coords="13,238,161,259">\ref AddressingPolicyBase</span> + <span coords="224,0,294,36">\ref FileHandle</span> + <span coords="97,353,222,375">\ref LLAddressingPolicy</span> + <span coords="476,126,671,158">\ref ServerSocketHandle</span> + </div> + \htmlonly <img src="SocketLibrary-classes.png" border="0" alt="SocketLibrary-classes" usemap="#SocketLibrary-classes"> \endhtmlonly \section impl_notes Arbitrary Implementation Notes diff --git a/Socket/Protocols.dia b/Socket/Protocols.dia index 9cd03fab03d038282d11f90cc1ba77c73b28c0dd..58c9910916cd25abe60b8256942fa88ecc6c0b8d 100644 Binary files a/Socket/Protocols.dia and b/Socket/Protocols.dia differ diff --git a/Socket/SocketPolicy.hh b/Socket/SocketPolicy.hh index 440a9cf404a36295403f2a86fa569603631d595a..209c374b1a4b7b08de1dea5277755ffaae735567 100644 --- a/Socket/SocketPolicy.hh +++ b/Socket/SocketPolicy.hh @@ -32,17 +32,16 @@ /** \defgroup policy_group The Policy Framework - \htmlonly - <map name="socketPolicy"> - <area shape="rect" alt="SocketPolicy" href="structsenf_1_1SocketPolicy.html" title="SocketPolicy" coords="276,90,558,213" /> - <area shape="rect" alt="WritePolicyBase" href="structsenf_1_1WritePolicyBase.html" title="WritePolicyBase" coords="39,243,174,268" /> - <area shape="rect" alt="ReadPolicyBase" href="structsenf_1_1ReadPolicyBase.html" title="ReadPolicyBase" coords="42,204,174,231" /> - <area shape="rect" alt="CommunicationPolicyBase" href="structsenf_1_1CommunicationPolicyBase.html" title="CommunicationPolicyBase" coords="0,166,215,193" /> - <area shape="rect" alt="FramingPolicyBase" href="structsenf_1_1FramingPolicyBase.html" title="FramingPolicyBase" coords="30,129,185,155" /> - <area shape="rect" alt="AddressingPolicyBase" href="structsenf_1_1AddressingPolicyBase.html" title="AddressingPolicyBase" coords="17,90,200,116" /> - </map> - <img src="SocketPolicy.png" border="0" alt="Socket Policy" usemap="#socketPolicy"> - \endhtmlonly + <div class="diamap" name="SocketPolicy"> + <span coords="39,229,182,257">\ref WritePolicyBase</span> + <span coords="17,76,210,105">\ref AddressingPolicyBase</span> + <span coords="29,114,194,143">\ref FramingPolicyBase</span> + <span coords="368,0,463,28">\ref PolicyBase</span> + <span coords="275,2,691,185">\ref SocketPolicy</span> + <span coords="0,152,227,181">\ref CommunicationPolicyBase</span> + <span coords="41,191,180,219">\ref ReadPolicyBase</span> + </div> + \htmlonly <img src="SocketPolicy.png" border="0" alt="SocketPolicy" usemap="#SocketPolicy"> \endhtmlonly \section policy_group_introduction Introduction to the Policy Framework diff --git a/Socket/SocketProtocol.hh b/Socket/SocketProtocol.hh index 587970ad08fcf8a066b1a7dae152cb7005c1652b..012b857da9b1e045b1f046a1ecbe0fca16f08087 100644 --- a/Socket/SocketProtocol.hh +++ b/Socket/SocketProtocol.hh @@ -32,21 +32,19 @@ /** \defgroup protocol_group The Protocol Classes - \htmlonly - <map name="Protocols"> - <area shape="rect" alt="SocketProtocol" href="classsenf_1_1SocketProtocol.html" title="SocketProtocol" coords="0,0,118,25"/> - <area shape="rect" alt="UNSocketProtocol" href="classsenf_1_1UNSocketProtocol.html" title="UNSocketProtocol" coords="139,392,279,418"/> - <area shape="rect" alt="PacketSocketProtocol" href="classsenf_1_1PacketSocketProtocol.html" title="PacketSocketProtocol" coords="527,412,693,438"/> - <area shape="rect" alt="ConcreteSocketProtocol" href="classsenf_1_1ConcreteSocketProtocol.html" title="ConcreteSocketProtocol" coords="214,49,471,86"/> - <area shape="rect" alt="BSDSocketProtocol" href="classsenf_1_1BSDSocketProtocol.html" title="BSDSocketProtocol" coords="135,112,283,137"/> - <area shape="rect" alt="DatagramSocketProtocol" href="classsenf_1_1DatagramSocketProtocol.html" title="DatagramSocketProtocol" coords="114,258,304,284"/> - <area shape="rect" alt="TCPSocketProtocol" href="classsenf_1_1TCPSocketProtocol.html" title="TCPSocketProtocol" coords="136,320,281,346"/> - <area shape="rect" alt="UNDatagramSocketProtocol" href="classsenf_1_1UNDatagramSocketProtocol.html" title="UNDatagramSocketProtocol" coords="395,446,604,472"/> - <area shape="rect" alt="AddressableBSDSocketProtocol" href="classsenf_1_1AddressableBSDSocketProtocol.html" title="AddressableBSDSocketProtocol" coords="89,189,329,215"/> - <area shape="rect" alt="TCPv4SocketProtocol" href="classsenf_1_1TCPv4SocketProtocol.html" title="TCPv4SocketProtocol" coords="282,481,444,507"/> - </map> - <img src="Protocols.png" border="0" alt="Protocols" usemap="#Protocols"> - \endhtmlonly + <div class="diamap" name="Protocols"> + <span coords="0,0,118,25">\ref SocketProtocol</span> + <span coords="139,381,279,407">\ref UNSocketProtocol</span> + <span coords="527,412,693,438">\ref PacketSocketProtocol</span> + <span coords="214,49,471,86">\ref ConcreteSocketProtocol</span> + <span coords="135,112,283,137">\ref BSDSocketProtocol</span> + <span coords="114,258,304,284">\ref DatagramSocketProtocol</span> + <span coords="136,320,281,346">\ref TCPSocketProtocol</span> + <span coords="395,446,604,472">\ref UNDatagramSocketProtocol</span> + <span coords="89,189,329,215">\ref AddressableBSDSocketProtocol</span> + <span coords="282,481,444,507">\ref TCPv4SocketProtocol</span> + </div> + \htmlonly <img src="Protocols.png" border="0" alt="Protocols" usemap="#Protocols"> \endhtmlonly The socket handle classes and templates only implement the most important socket API methods using the policy framework. To access the complete API, the protocol interface is diff --git a/Utils/Externals.dox b/Utils/Externals.dox new file mode 100644 index 0000000000000000000000000000000000000000..f517454db6946e1c9bcbc510c19c7fe10e4e3df8 --- /dev/null +++ b/Utils/Externals.dox @@ -0,0 +1,16 @@ +/**\defgroup externals External objects referenced from within SENF */ +///\addtogroup externals +///\{ +namespace boost { class array {}; } +namespace boost { class base_from_member {}; } +namespace boost { class enable_if {}; } +namespace boost { class equality_comparable {}; } +namespace boost { class false_type {}; } +namespace boost { class iterator_facade {}; } +namespace boost { class noncopyable {}; } +namespace boost { class singleton_pool {}; } +namespace boost { class totally_ordered {}; } +namespace boost { class true_type {}; } +namespace std { class exception {}; } +namespace std { class string {}; } +///\} diff --git a/doclib/Doxyfile.global b/doclib/Doxyfile.global index fab9b0a99aad86fe2c08478f79b436bb44e6eb67..ddf11b9b83a49d518e0523101d99fb87a7ddc904 100644 --- a/doclib/Doxyfile.global +++ b/doclib/Doxyfile.global @@ -1325,14 +1325,14 @@ CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. -GRAPHICAL_HIERARCHY = YES +GRAPHICAL_HIERARCHY = NO # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. -DIRECTORY_GRAPH = YES +DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif @@ -1369,7 +1369,7 @@ DOT_GRAPH_MAX_NODES = 10 # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. -MAX_DOT_GRAPH_DEPTH = 3 +MAX_DOT_GRAPH_DEPTH = 5 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is enabled by default, which results in a transparent diff --git a/doclib/dot b/doclib/dot index ba3169246c04749b739632cb519609d971998379..d0ccf8694559717eedfd2d78813c5ab30403d6c7 100755 --- a/doclib/dot +++ b/doclib/dot @@ -1,6 +1,7 @@ #!/bin/sh topdir="`dirname "$0"`"; topdir="`cd "$topdir/.."; pwd`" +sed -i -e 's/rankdir=LR/rankdir=TB/' "$1" "$topdir/doclib/dot-munge.pl" "$1" case "$2" in diff --git a/doclib/dot-munge.pl b/doclib/dot-munge.pl index dd0d8f9b8dc431324fdd0891cbec9de9158ff29f..6214e48b30fefde51923041483e43855f718826c 100755 --- a/doclib/dot-munge.pl +++ b/doclib/dot-munge.pl @@ -5,7 +5,7 @@ s/fontsize=10/fontsize=8/g; s/fontname="FreeSans.ttf"/fontname="Verdana"/g; # Wrap long labels (templates and pathnames) -if (/label=\"([^"]*)\"/) { #"])){ # To make emacs happy ... +if (/label=\"([^"]{48,})\"/) { #"])){ # To make emacs happy ... $pre=$`; $post=$'; #'; # To make emacs happy ... $label=$1; diff --git a/doclib/filter.pl b/doclib/filter.pl index dd192c8eeb8ba4c0778354fb50f32046362c81a1..6a022e2f148b8549f630af4a47818a0205c02ab2 100755 --- a/doclib/filter.pl +++ b/doclib/filter.pl @@ -1,14 +1,21 @@ #!/usr/bin/perl -n +BEGIN { + ($topdir=$0) =~ s{doclib/.*$}{}; + print $topdir,"\n"; +} + s/\s*$//; while (s/\t/' 'x(8-length($`)%8)/e) {} if (/^\s*\\code$/ .. /\\endcode/ && !/^$/) { $i=length($1) if /^(\s*)\\code$/; print substr($_,$i),"\n"; -} elsif (s/^(\s*)<pre>$/$1<pre class="fragment">/ .. /<\/pre>/ && !/^$/) { +} +elsif (s/^(\s*)<pre>$/$1<pre class="fragment">/ .. /<\/pre>/ && !/^$/) { $i=length($1) if /^(\s*)<pre class="fragment">$/; print substr($_,$i),"\n"; -} else { +} +else { print $_,"\n"; } diff --git a/doclib/html-munge.xsl b/doclib/html-munge.xsl index 4579003dd004758debf40bbfae7a17b98e4089e2..734ca8be4ee1ed8ee71c6925f372d139145e80b0 100644 --- a/doclib/html-munge.xsl +++ b/doclib/html-munge.xsl @@ -147,10 +147,35 @@ <xsl:apply-templates/> </xsl:copy> </xsl:template> + + <!-- Build dia image-map from special div/span elements --> + <xsl:template match="div[@class='diamap']"> + <xsl:element name="map"> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:for-each select="span"> + <xsl:if test="a"> + <xsl:variable name="name" select="string(a[1])"/> + <xsl:element name="area"> + <xsl:attribute name="shape">rect</xsl:attribute> + <xsl:attribute name="alt"><xsl:value-of select="$name"/></xsl:attribute> + <xsl:attribute name="title"><xsl:value-of select="$name"/></xsl:attribute> + <xsl:attribute name="href"><xsl:value-of select="a[1]/@href"/></xsl:attribute> + <xsl:attribute name="coords"><xsl:value-of select="@coords"/></xsl:attribute> + </xsl:element> + </xsl:if> + </xsl:for-each> + </xsl:element> + </xsl:template> <!-- Remove the automatically inserted search form (we build our own) --> <xsl:template match="li[form]"> </xsl:template> + + <xsl:template match="table[preceding-sibling::*[1][self::div][@class='qindex']]"> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">qindextable</xsl:with-param> + </xsl:call-template> + </xsl:template> <xsl:template match="dl[dt/b/a/text()='Bug:']"> <xsl:call-template name="add-class"> @@ -176,7 +201,7 @@ </xsl:call-template> </xsl:template> - <xsl:template match="dl[dt/b/text()='Parameters:']"> + <xsl:template match="dl[dt/b/text()='Parameters:']|dl[dt/b/text()='Template Parameters:']"> <xsl:call-template name="add-class"> <xsl:with-param name="class">parameters</xsl:with-param> </xsl:call-template> diff --git a/doclib/makeDiaImageMap.py b/doclib/makeDiaImageMap.py new file mode 100755 index 0000000000000000000000000000000000000000..db9a9ce18ba6a7e60dcb74a852affed6cd469145 --- /dev/null +++ b/doclib/makeDiaImageMap.py @@ -0,0 +1,81 @@ +#!/usr/bin/python + +import sys, os, gzip +import Ft.Xml.Xslt.Processor +import Ft.Xml.Domlette +from Ft.Xml.InputSource import DefaultFactory as InputFactory +import cStringIO + +stylesheet=u""" +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:dia="http://www.lysator.liu.se/~alla/dia/" + version="1.0"> + + <xsl:output method="text"/> + + <xsl:template match="text()"/> + + <xsl:template match="dia:object[@type='UML - Class']"> + <xsl:value-of select="dia:attribute[@name='name']/dia:string"/> + <xsl:text> </xsl:text> + <xsl:value-of select="dia:attribute[@name='obj_bb']/dia:rectangle/@val"/> + <xsl:text>
</xsl:text> + </xsl:template> + + <xsl:template match="dia:attribute[@name='obj_bb']/dia:rectangle"> + <xsl:text>## </xsl:text> + <xsl:value-of select="@val"/> + <xsl:text>
</xsl:text> + </xsl:template> + +</xsl:stylesheet> +""".strip().encode('utf-8') + +def xsltproc(source, stylesheet): + processor = Ft.Xml.Xslt.Processor.Processor() + processor.setDocumentReader(Ft.Xml.Domlette.NonvalidatingReader) + processor.appendStylesheet(stylesheet) + output = cStringIO.StringIO() + processor.run(source, outputStream = output) + return output.getvalue() + +minx = miny = maxx = maxy = None +classes = {} + +basename = sys.argv[1].rsplit('.',1)[0] +png = os.popen("pngtopnm %s.png 2>/dev/null" % basename) +png.readline() +size = map(int, png.readline().strip().split(' ')) +png.read() + +for line in xsltproc(InputFactory.fromStream(gzip.open(sys.argv[1]), sys.argv[1]), + InputFactory.fromString(stylesheet, '<string>')).strip().split("\n"): + name,box = line.rsplit(' ',1) + tlx, tly, brx, bry = (float(val) + for point in box.split(';') + for val in point.split(',')) + name = name[1:-1] + if minx is None or tlx<minx : minx = tlx + if maxx is None or tlx>maxx : maxx = tlx + if minx is None or brx<minx : minx = brx + if maxx is None or brx>maxx : maxx = brx + if miny is None or tly<miny : miny = tly + if maxy is None or tly>maxy : maxy = tly + if miny is None or bry<miny : miny = bry + if maxy is None or bry>maxy : maxy = bry + if name: + classes[name] = (tlx, tly, brx, bry) + +print '<div class="diamap" name="%s">' % basename +for name,box in classes.iteritems(): + print '<span coords="%d,%d,%d,%d">\\ref %s</span>' % ( + (box[0]-minx)*size[0]/(maxx-minx), + (box[1]-miny)*size[1]/(maxy-miny), + (box[2]-minx)*size[0]/(maxx-minx), + (box[3]-miny)*size[1]/(maxy-miny), + name) +print '</div>' +print '\\htmlonly <img src="%s.png" border="0" alt="%s" usemap="#%s"> \\endhtmlonly' % ( + basename,basename,basename) diff --git a/doclib/senf.css b/doclib/senf.css index 1e4697d252bf4a1a2886e812fb16a6b419fdb79a..c11bc75bf39458de0d561d02bd02044879dec8dc 100644 --- a/doclib/senf.css +++ b/doclib/senf.css @@ -430,7 +430,7 @@ div.ah { margin-right: 10px; } -div.nav { +div.nav, div.navpath { width: auto; background-color: white; border: none; @@ -449,6 +449,14 @@ div.qindex { line-height: 140%; } +table.qindextable { + font-size: 90%; +} + +table.qindextable td { + width: 33%; +} + dl.parameters dd table { width: auto; }