From: g0dil Date: Wed, 13 Feb 2008 10:33:11 +0000 (+0000) Subject: doclib: Add helper script to build image map from dia files X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=65909c44022ccd7b97d4c2810fbf67ffa980207e doclib: Add helper script to build image map from dia files doclib: Introduce an intermediate doxygen-compatible image map format Update all image maps to the new format git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@691 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/HowTos/NewPacket/Mainpage.dox b/HowTos/NewPacket/Mainpage.dox index 8769831..436a428 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 68a0ea4..a69c3d8 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 2491f50..17aa545 100644 --- a/PPI/Mainpage.dox +++ b/PPI/Mainpage.dox @@ -461,7 +461,28 @@ \section ppi_classdiagram Class Diagram - \image html classes.png +
+ \ref senf::ppi::connector::PassiveConnector + \ref senf::ppi::EventManager + \ref senf::ppi::connector::ActiveOutput + \ref senf::ppi::connector::ActiveInput + \ref senf::ppi::RouteBase + \ref senf::ppi::Route + \ref (some module) + \ref senf::ppi::EventImplementation + \ref senf::ppi::module::Module + \ref senf::ppi::connector::Connector + \ref senf::ppi::connector::PassiveOutput + \ref senf::ppi::detail::EventBindingBase + \ref senf::ppi::connector::InputConnector + \ref senf::ppi::RouteImplementation + \ref senf::ppi::connector::OutputConnector + \ref senf::ppi::connector::ActiveConnector + \ref senf::ppi::detail::EventBinding + \ref senf::ppi::EventDescriptor + \ref senf::ppi::connector::PassiveInput +
+ \htmlonly classes \endhtmlonly */ diff --git a/Socket/FileHandle.hh b/Socket/FileHandle.hh index 5b0e34d..f578635 100644 --- a/Socket/FileHandle.hh +++ b/Socket/FileHandle.hh @@ -26,19 +26,15 @@ /** \defgroup handle_group The Handle Hierarchy - \htmlonly - - FileHandle - SocketHandle - ClientSocketHandle - ServerSocketHandle - ProtocolServerSocketHandle - ProtocolClientSocketHandle - -
- FhHierarchy -
- \endhtmlonly +
+ \ref SocketHandle + \ref ClientSocketHandle + \ref ProtocolClientSocketHandle + \ref ProtocolServerSocketHandle + \ref FileHandle + \ref ServerSocketHandle +
+ \htmlonly 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 c473505..9a0c847 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 +
+ \ref IPv4Protocol + \ref WritePolicyBase + \ref SocketBufferingPolicy + \ref NoAddressingPolicy + \ref NotReadablePolicy + \ref AdressableBSDSocketProtocol + \ref BufferingPolicyBase + \ref FramingPolicyBase + \ref FileBody + \ref DatagramFramingPolicy + \ref INet6AddressingPolicy + \ref BSDSocketProtocol + \ref INet4AddressingPolicy + \ref ProtocolServerSocketHandle + \ref PolicyBase + \ref TCPProtocol + \ref ReadablePolicy + \ref SocketPolicy + \ref CommunicationPolicyBase + \ref TCPv6Protocol + \ref SocketProtocol + \ref ConnectedCommunicationPolicy + \ref ProtocolClientSocketHandle + \ref IPv6Protocol + \ref WritablePolicy + \ref SocketBody + \ref PacketProtocol + \ref NotWritablePolicy + \ref ReadPolicyBase + \ref SocketHandle + \ref ClientSocketHandle + \ref UnconnectedCommunicationPolicy + \ref ConcreteSocketProtocol + \ref TCPv4Protocol + \ref StreamFramingPolicy + \ref AddressingPolicyBase + \ref FileHandle + \ref LLAddressingPolicy + \ref ServerSocketHandle +
+ \htmlonly SocketLibrary-classes \endhtmlonly \section impl_notes Arbitrary Implementation Notes diff --git a/Socket/Protocols.dia b/Socket/Protocols.dia index 9cd03fa..58c9910 100644 Binary files a/Socket/Protocols.dia and b/Socket/Protocols.dia differ diff --git a/Socket/SocketPolicy.hh b/Socket/SocketPolicy.hh index 440a9cf..209c374 100644 --- a/Socket/SocketPolicy.hh +++ b/Socket/SocketPolicy.hh @@ -32,17 +32,16 @@ /** \defgroup policy_group The Policy Framework - \htmlonly - - SocketPolicy - WritePolicyBase - ReadPolicyBase - CommunicationPolicyBase - FramingPolicyBase - AddressingPolicyBase - - Socket Policy - \endhtmlonly +
+ \ref WritePolicyBase + \ref AddressingPolicyBase + \ref FramingPolicyBase + \ref PolicyBase + \ref SocketPolicy + \ref CommunicationPolicyBase + \ref ReadPolicyBase +
+ \htmlonly SocketPolicy \endhtmlonly \section policy_group_introduction Introduction to the Policy Framework diff --git a/Socket/SocketProtocol.hh b/Socket/SocketProtocol.hh index 587970a..012b857 100644 --- a/Socket/SocketProtocol.hh +++ b/Socket/SocketProtocol.hh @@ -32,21 +32,19 @@ /** \defgroup protocol_group The Protocol Classes - \htmlonly - - SocketProtocol - UNSocketProtocol - PacketSocketProtocol - ConcreteSocketProtocol - BSDSocketProtocol - DatagramSocketProtocol - TCPSocketProtocol - UNDatagramSocketProtocol - AddressableBSDSocketProtocol - TCPv4SocketProtocol - - Protocols - \endhtmlonly +
+ \ref SocketProtocol + \ref UNSocketProtocol + \ref PacketSocketProtocol + \ref ConcreteSocketProtocol + \ref BSDSocketProtocol + \ref DatagramSocketProtocol + \ref TCPSocketProtocol + \ref UNDatagramSocketProtocol + \ref AddressableBSDSocketProtocol + \ref TCPv4SocketProtocol +
+ \htmlonly 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 0000000..f517454 --- /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 fab9b0a..ddf11b9 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 ba31692..d0ccf86 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 dd0d8f9..6214e48 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 dd192c8..6a022e2 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*)
$/$1
/ .. /<\/pre>/ && !/^$/) {
+} 
+elsif (s/^(\s*)
$/$1
/ .. /<\/pre>/ && !/^$/) {
     $i=length($1) if /^(\s*)
$/;
     print substr($_,$i),"\n";
-} else {
+} 
+else {
     print $_,"\n";
 }
diff --git a/doclib/html-munge.xsl b/doclib/html-munge.xsl
index 4579003..734ca8b 100644
--- a/doclib/html-munge.xsl
+++ b/doclib/html-munge.xsl
@@ -147,10 +147,35 @@
       
     
   
+  
+  
+  
+    
+      
+      
+        
+          
+          
+            rect
+            
+            
+            
+            
+          
+        
+      
+    
+  
 
   
    
   
+
+  
+    
+      qindextable
+    
+  
   
   
     
@@ -176,7 +201,7 @@
     
   
 
-  
+  
     
       parameters
     
diff --git a/doclib/makeDiaImageMap.py b/doclib/makeDiaImageMap.py
new file mode 100755
index 0000000..db9a9ce
--- /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"""
+
+
+
+  
+
+  
+
+  
+    
+     
+    
+    

+  
+
+  
+    ## 
+    
+    

+  
+
+
+""".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, '')).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 tlxmaxx : maxx = tlx
+    if minx is None or brxmaxx : maxx = brx
+    if miny is None or tlymaxy : maxy = tly
+    if miny is None or brymaxy : maxy = bry 
+    if name:
+        classes[name] = (tlx, tly, brx, bry)
+
+print '
' % basename +for name,box in classes.iteritems(): + print '\\ref %s' % ( + (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 '
' +print '\\htmlonly %s \\endhtmlonly' % ( + basename,basename,basename) diff --git a/doclib/senf.css b/doclib/senf.css index 1e4697d..c11bc75 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; }