Remove old Doxygen files
This commit is contained in:
parent
c4f5a0d13f
commit
60a18f1271
6
COPYING
6
COPYING
|
@ -115,12 +115,6 @@ Files: doc/media/icons/flags/*
|
|||
Copyright: Mark James
|
||||
License: CC-3
|
||||
|
||||
Files: scripts/doxygenfilter scripts/DoxyGen/Filter.pm
|
||||
scripts/DoxyGen/SQLFilter.pm
|
||||
Copyright: 2002, Bart Schuller
|
||||
2006, Phinex Informatik AG <tom.aeby@phinex.ch>
|
||||
License: Artistic or GPL-1+
|
||||
|
||||
Files: doc/lib/tpl/default/images/* doc/lib/images/*
|
||||
doc/lib/plugins/note/images/* doc/media/wiki/dokuwiki-128.png
|
||||
Copyright: 2004-2012 Andreas Gohr <andi@splitbrain.org>
|
||||
|
|
14
Makefile
14
Makefile
|
@ -242,8 +242,6 @@ all: configure common handler manager portal
|
|||
@echo 'Other targets :'
|
||||
@echo " * Partial build :"
|
||||
@echo " - portal, manager, handler"
|
||||
@echo " * Doxygen documentation"
|
||||
@echo " - doxygen (to build Doxygen documentation in doc/devel/)"
|
||||
@echo
|
||||
@echo 'Other targets launched by "make install" :'
|
||||
@echo " * Perl libraries install :"
|
||||
|
@ -962,18 +960,6 @@ manager_cpan: manager_conf
|
|||
documentation:
|
||||
@cd doc/ && ../scripts/doc.pl
|
||||
|
||||
doxygen: clean
|
||||
$(PERL) -i -pe 's/^(PROJECT_NUMBER\s*=\s*)\d.*$$/$${1}'$(VERSION)'/' Doxyfile
|
||||
COLLABORATIVE_GRAPH=1 doxygen Doxyfile
|
||||
mkdir doc/devel/tmp
|
||||
mv doc/devel/html/inherit* doc/devel/tmp/
|
||||
COLLABORATIVE_GRAPH=0 doxygen Doxyfile
|
||||
mv -f doc/devel/tmp/* doc/devel/html/
|
||||
rm -rf doc/devel/tmp
|
||||
$(PERL) -i -pe 's/Graphical Class Hierarchy/Class Collaboration Graph/' doc/devel/html/inherits.html doc/devel/html/tree.html
|
||||
# Some files are not generated
|
||||
for i in doc/devel/html/*dot; do dot -T png -o $${i/.dot/.png} $$i; rm -f $$i; done
|
||||
|
||||
diff: debian-diff
|
||||
|
||||
# TODO: change this
|
||||
|
|
|
@ -115,12 +115,6 @@ Files: doc/media/icons/flags/*
|
|||
Copyright: Mark James
|
||||
License: CC-3
|
||||
|
||||
Files: scripts/doxygenfilter scripts/DoxyGen/Filter.pm
|
||||
scripts/DoxyGen/SQLFilter.pm
|
||||
Copyright: 2002, Bart Schuller
|
||||
2006, Phinex Informatik AG <tom.aeby@phinex.ch>
|
||||
License: Artistic or GPL-1+
|
||||
|
||||
Files: doc/lib/tpl/default/images/* doc/lib/images/*
|
||||
doc/lib/plugins/note/images/* doc/media/wiki/dokuwiki-128.png
|
||||
Copyright: 2004-2012 Andreas Gohr <andi@splitbrain.org>
|
||||
|
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
# =======================================================================
|
||||
# Doxygen Pre-Processor for Perl
|
||||
# Copyright (C) 2002 Bart Schuller
|
||||
# Copyright (C) 2006 Phinex Informatik AG
|
||||
# All Rights Reserved
|
||||
#
|
||||
# Doxygen Filter is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
# Larry Wall's 'Artistic License' for perl can be found in
|
||||
# http://www.perl.com/pub/a/language/misc/Artistic.html
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# Author: Aeby Thomas, Phinex Informatik AG,
|
||||
# Based on DoxygenFilter from Bart Schuller
|
||||
# E-Mail: tom.aeby@phinex.ch
|
||||
#
|
||||
# Phinex Informatik AG
|
||||
# Thomas Aeby
|
||||
# Kirchweg 52
|
||||
# 1735 Giffers
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# @(#) $Id: Filter.pm,v 1.2 2006/01/31 16:53:52 aeby Exp $
|
||||
#
|
||||
# Revision History:
|
||||
#
|
||||
# $Log: Filter.pm,v $
|
||||
# Revision 1.2 2006/01/31 16:53:52 aeby
|
||||
# added copyright info
|
||||
#
|
||||
#
|
||||
# =======================================================================
|
||||
|
||||
## @file
|
||||
# implementation of DoxyGen::Filter.
|
||||
|
||||
## @class
|
||||
# Filter from non-C++ syntax API docs to Doxygen-compatible syntax.
|
||||
# This class is meant to be used as a filter for the
|
||||
# <a href="http://www.doxygen.org/">Doxygen</a> documentation tool.
|
||||
package DoxyGen::Filter;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
## @cmethod object new($outfh)
|
||||
# create a filter object.
|
||||
# @param outfh optional output filehandle; defaults to STDOUT
|
||||
# @return filter object
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $outfh = shift || \*STDOUT;
|
||||
return bless { outfh => $outfh }, $class;
|
||||
}
|
||||
|
||||
## @method virtual void filter($infh)=0
|
||||
# do the filtering.
|
||||
# @param infh input filehandle, normally STDIN
|
||||
sub filter {
|
||||
die "subclass responsibility";
|
||||
}
|
||||
|
||||
## @method protected string protection($sig)
|
||||
# Return the protection of a method/function signature.
|
||||
# @param sig the method signature
|
||||
# @return Either "Public" or "Private".
|
||||
sub protection {
|
||||
my ( $self, $sig ) = @_;
|
||||
return $sig =~ /^(private|protected)/ ? "\u$1" : 'Public';
|
||||
}
|
||||
|
||||
## @method void start($command)
|
||||
# start a doc comment.
|
||||
# Outputs the start of a javadoc comment.
|
||||
# @param command the javadoc command
|
||||
sub start {
|
||||
my $self = shift;
|
||||
my $command = shift;
|
||||
$self->print("/** $command\n");
|
||||
return $self;
|
||||
}
|
||||
|
||||
## @method void end()
|
||||
# end a doc comment.
|
||||
# Outputs the end of a javadoc comment.
|
||||
sub end {
|
||||
my $self = shift;
|
||||
$self->print("*/\n");
|
||||
return $self;
|
||||
}
|
||||
|
||||
## @method void push($section)
|
||||
# Start a diversion to a section.
|
||||
# @param section The name of the section to divert all output to.
|
||||
# @see pop(), print(), flush()
|
||||
sub push {
|
||||
my ( $self, $section ) = @_;
|
||||
$self->{current_section} = $section;
|
||||
return $self;
|
||||
}
|
||||
|
||||
## @method void pop()
|
||||
# End a diversion to a section.
|
||||
# @see push(), flush()
|
||||
sub pop {
|
||||
my ($self) = @_;
|
||||
delete $self->{current_section};
|
||||
return $self;
|
||||
}
|
||||
|
||||
## @method void print(@args)
|
||||
# print a string to the output handle.
|
||||
# If a diversion to a specific section is in effect: saves the text under
|
||||
# that section.
|
||||
# @param args the strings to be printed
|
||||
# @see push(), flush()
|
||||
sub print {
|
||||
my $self = shift;
|
||||
return unless @_;
|
||||
if ( my $section = $self->{current_section} ) {
|
||||
CORE::push @{ $self->{sections}{$section} }, @_;
|
||||
}
|
||||
else {
|
||||
my $outfh = $self->{outfh};
|
||||
print $outfh @_;
|
||||
}
|
||||
return $self;
|
||||
}
|
||||
|
||||
## @method void more(@args)
|
||||
# process the follow-up lines after the initial apidoc line.
|
||||
# @param args the lines to be processed
|
||||
sub more {
|
||||
my $self = shift;
|
||||
$self->print(@_);
|
||||
return $self;
|
||||
}
|
||||
|
||||
my @order = (
|
||||
'Public Initialization Methods',
|
||||
'Public Initialization Functions',
|
||||
'Public Class Methods',
|
||||
'Public Authentication Process Methods',
|
||||
'Public Running Methods',
|
||||
'Public Running Functions',
|
||||
'Public Object Methods',
|
||||
'Public Functions',
|
||||
'Protected Initialization Methods',
|
||||
'Protected Initialization Functions',
|
||||
'Protected Class Methods',
|
||||
'Protected Authentication Process Methods',
|
||||
'Protected Running Methods',
|
||||
'Protected Running Functions',
|
||||
'Protected Object Methods',
|
||||
'Protected Functions',
|
||||
'Private Initialization Methods',
|
||||
'Private Initialization Functions',
|
||||
'Private Class Methods',
|
||||
'Private Authentication Process Methods',
|
||||
'Private Running Methods',
|
||||
'Private Running Functions',
|
||||
'Private Object Methods',
|
||||
'Private Functions',
|
||||
);
|
||||
## @method void flush()
|
||||
# Flush the saved sections. Should be called at the end of a class.
|
||||
# @see push(), print()
|
||||
sub flush {
|
||||
my $self = shift;
|
||||
my $sections = $self->{sections};
|
||||
foreach (@order) {
|
||||
next unless $sections->{$_};
|
||||
$self->start("\@name $_\n")->end;
|
||||
$self->start("\@{")->end;
|
||||
$self->print("\n");
|
||||
$self->print( @{ $sections->{$_} } );
|
||||
$self->print("\n");
|
||||
$self->start("\@}")->end;
|
||||
$self->print("\n");
|
||||
}
|
||||
delete $self->{sections};
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Doxygen::Filter - use DoxyGen with Perl and other languages.
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Filter from non-C++ syntax API docs to Doxygen-compatible syntax.
|
||||
This class is meant to be used as a filter for the
|
||||
Doxygen (http://www.doxygen.org/) documentation tool
|
||||
|
|
@ -1,473 +0,0 @@
|
|||
|
||||
# =======================================================================
|
||||
# Doxygen Pre-Processor for Perl
|
||||
# Copyright (C) 2002 Bart Schuller
|
||||
# Copyright (C) 2006 Phinex Informatik AG
|
||||
# All Rights Reserved
|
||||
#
|
||||
# Doxygen Filter is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
# Larry Wall's 'Artistic License' for perl can be found in
|
||||
# http://www.perl.com/pub/a/language/misc/Artistic.html
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# Author: Aeby Thomas, Phinex Informatik AG,
|
||||
# Based on DoxygenFilter from Bart Schuller
|
||||
# E-Mail: tom.aeby@phinex.ch
|
||||
#
|
||||
# Phinex Informatik AG
|
||||
# Thomas Aeby
|
||||
# Kirchweg 52
|
||||
# 1735 Giffers
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# @(#) $Id: PerlFilter.pm,v 1.4 2006/01/31 17:46:06 aeby Exp $
|
||||
#
|
||||
# Revision History:
|
||||
#
|
||||
# $Log: PerlFilter.pm,v $
|
||||
# Revision 1.4 2006/01/31 17:46:06 aeby
|
||||
# filter(): avoid warnings about uninitialized values
|
||||
# analyze_sub(): added some more argument recognition patterns
|
||||
#
|
||||
# Revision 1.3 2006/01/31 16:53:52 aeby
|
||||
# added copyright info
|
||||
#
|
||||
#
|
||||
# =======================================================================
|
||||
|
||||
## @file
|
||||
# implementation of DoxyGen::PerlFilter.
|
||||
#
|
||||
|
||||
## @class
|
||||
# Filter from perl syntax API docs to Doxygen-compatible syntax.
|
||||
# This class is meant to be used as a filter for the
|
||||
# <a href="http://www.doxygen.org/">Doxygen</a> documentation tool.
|
||||
package DoxyGen::PerlFilter;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use base qw(DoxyGen::Filter);
|
||||
my $id = __PACKAGE__;
|
||||
|
||||
## @method void filter($infh)
|
||||
# Do the filtering.
|
||||
# @param infh input filehandle, normally STDIN
|
||||
sub filter {
|
||||
my ( $self, $infile ) = @_;
|
||||
open( my $infh, $infile );
|
||||
my $current_class = "";
|
||||
my $file = [];
|
||||
my $endMark = 1;
|
||||
my ( $cc, $cl, $lc, $ll ) = ( 0, 0, 0, 0 );
|
||||
while (<$infh>) {
|
||||
$endMark = 0 if (/^\s*use\s+AutoLoader/);
|
||||
last if ( $endMark and /^__END__$/ );
|
||||
|
||||
#next if (/^$/);
|
||||
$cc = ( /^\s*#/ ? 1 : 0 );
|
||||
$lc = ( /[\{\}\[\];]\s*$/ ? 1 : 0 );
|
||||
if ( $cc or $cl or $ll or not(@$file) ) {
|
||||
push( @$file, $_ );
|
||||
}
|
||||
else {
|
||||
$file->[ $#{$file} ] =~ s/[\r\n]/ /g;
|
||||
$file->[ $#{$file} ] .= $_;
|
||||
}
|
||||
$cl = $cc;
|
||||
$ll = $lc;
|
||||
$cl++ if (/\s#/);
|
||||
}
|
||||
|
||||
#print STDERR @$file;
|
||||
$self->file_contents($file);
|
||||
my $objcontext =
|
||||
grep( /^\s*use\s+base\s/, @$file )
|
||||
|| grep( /\@ISA/, @$file )
|
||||
|| grep( /^\s*bless/, @$file )
|
||||
|| grep( /^\s*sub\s+new\s/, @$file )
|
||||
|| grep( /\$self/, @$file );
|
||||
|
||||
push( @$file, "" ); # in order to have a delimiting empty line at EOF
|
||||
for ( my $line = 0 ; $line <= $#$file ; ) {
|
||||
$_ = $file->[ $line++ ];
|
||||
last if ( $endMark and /^__END__$/ );
|
||||
if (/^##\s*\@(\S+)\s*(.*)/) {
|
||||
my ( $command, $args ) = ( $1, $2 );
|
||||
my @more;
|
||||
while ( $_ = $file->[ $line++ ] ) {
|
||||
if (/^#\s?(.+)/s) {
|
||||
push @more, $1;
|
||||
}
|
||||
else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ( $command eq 'file' ) {
|
||||
$args ||= $infile;
|
||||
$self->start("\@$command $args");
|
||||
$self->more(@more);
|
||||
$self->end;
|
||||
}
|
||||
elsif ( $command eq 'class' ) {
|
||||
$objcontext = 1;
|
||||
unless ($args) {
|
||||
($args) = /package\s(.*);/;
|
||||
}
|
||||
if ($current_class) {
|
||||
$self->flush;
|
||||
$self->print("};\n");
|
||||
}
|
||||
$current_class = $args;
|
||||
die "$line $command $args" unless($args);
|
||||
$self->emit_class( $args, $line,
|
||||
[ "\@$command $args", @more, "\@nosubgrouping" ] );
|
||||
}
|
||||
elsif ( $command eq 'imethod' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push(
|
||||
$self->protection($args) . ' Initialization Methods' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'apmethod' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args)
|
||||
. ' Authentication Process Methods' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'rmethod' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args) . ' Running Methods' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'cmethod' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args) . ' Class Methods' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'ifn' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push(
|
||||
$self->protection($args) . ' Initialization Functions' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'rfn' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args) . ' Running Functions' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'fn' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args) . ' Functions' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'method' ) {
|
||||
unless ($args) {
|
||||
($args) = $self->analyze_sub( $line - 1 );
|
||||
}
|
||||
$args = $self->munge_parameters($args);
|
||||
$self->push( $self->protection($args) . ' Object Methods' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
elsif ( $command eq 'enum' ) {
|
||||
$self->start("\@$command $args");
|
||||
$self->more(@more);
|
||||
$self->end;
|
||||
$self->print("$command $args;\n");
|
||||
}
|
||||
else {
|
||||
$self->start("\@$command $args");
|
||||
$self->more(@more);
|
||||
$self->end;
|
||||
}
|
||||
|
||||
# We ate a line when we got the rest of the comment lines
|
||||
redo if defined $_;
|
||||
}
|
||||
elsif (/^use\s+([\w:]+)/) {
|
||||
my $inc = $1;
|
||||
|
||||
#$inc =~ s/::/\//g;
|
||||
$self->print("#include \"$inc.pm\"\n");
|
||||
}
|
||||
elsif (/^package\s+([\w:]+)/) {
|
||||
if ($current_class) {
|
||||
$self->flush;
|
||||
$self->print("};\n");
|
||||
}
|
||||
next unless ($objcontext);
|
||||
$current_class = $1;
|
||||
$self->emit_class( $current_class, $line );
|
||||
}
|
||||
elsif (/^sub\s+([\w:]+)/) {
|
||||
my ( $proto, $name, @args ) = $self->analyze_sub( $line - 1 );
|
||||
if ( $current_class && @args && ( $args[0] eq "\$self" ) ) {
|
||||
$self->push( $self->protection($proto) . ' Object Methods' );
|
||||
$proto =~ s/\$self,*\s*//;
|
||||
}
|
||||
elsif ( $current_class && @args && ( $args[0] eq "\$self" ) ) {
|
||||
$self->push(
|
||||
$self->protection($proto) . ' Initialization Methods' );
|
||||
$proto =~ s/\$self,*\s*//;
|
||||
}
|
||||
elsif (
|
||||
$current_class
|
||||
&& ( ( @args && ( $args[0] eq "\$class" ) )
|
||||
|| ( $name eq "new" ) )
|
||||
)
|
||||
{
|
||||
$self->push( $self->protection($proto) . ' Class Methods' );
|
||||
}
|
||||
else {
|
||||
$self->push( $self->protection($proto) . ' Functions' );
|
||||
}
|
||||
$proto = $self->munge_parameters($proto);
|
||||
$self->print( $proto, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
}
|
||||
$self->flush();
|
||||
if ($current_class) {
|
||||
$self->print("};\n");
|
||||
}
|
||||
}
|
||||
|
||||
## @method @ analyze_sub( int line )
|
||||
# analyzes a subroutine declaration starting at the given line. Tries
|
||||
# to determine whicht arguments it takes.
|
||||
#
|
||||
# @param line The line number at which the sub starts
|
||||
# @return A function prototype, the name of the function and a
|
||||
# list of arguments it takes
|
||||
sub analyze_sub {
|
||||
my ( $self, $line ) = @_;
|
||||
|
||||
my $file = $self->file_contents();
|
||||
$file->[$line] =~ /^sub\s+(.*)\{/;
|
||||
my $name = $1;
|
||||
my $proto;
|
||||
my @args;
|
||||
if ( $name =~ /^(.*)\s*\((.*)\)/ ) {
|
||||
$name = $1;
|
||||
$proto = $2;
|
||||
}
|
||||
else {
|
||||
my $forward = 5;
|
||||
for (
|
||||
my $i = 0 ;
|
||||
$forward && ( $i + $line <= $#$file ) && !$proto ;
|
||||
$i++
|
||||
)
|
||||
{
|
||||
$_ = $file->[ $i + $line ];
|
||||
if (/^\s*my\s*\((.*)\)\s*=\s*\@_/) {
|
||||
$proto = $1;
|
||||
}
|
||||
elsif (/^\s*(local|my)\s*([^\s]*)\s*=\s*shift\s*;/) {
|
||||
push( @args, $2 );
|
||||
}
|
||||
elsif (/^\s*(local|my)\s*([^\s]*)\s*=\s*\$_\[\s*(\d+)\s*]/) {
|
||||
$args[$3] = $2;
|
||||
}
|
||||
elsif (/shift\s*->\s*[a-z0-9_]+\(/) {
|
||||
|
||||
# assuming anonymously used shifted value is $self
|
||||
push( @args, '$self' );
|
||||
}
|
||||
elsif ( /^\s*\n/ || /^\s*#/ ) {
|
||||
;
|
||||
}
|
||||
elsif (/}/) {
|
||||
$forward = 0;
|
||||
}
|
||||
else {
|
||||
$forward--;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($proto) {
|
||||
$proto =~ s/\s+//g;
|
||||
$proto =~ s/,/, /g;
|
||||
@args = split( ", ", $proto );
|
||||
}
|
||||
|
||||
$name =~ s/\s+$//;
|
||||
my $protection = "";
|
||||
if ( substr( $name, 0, 1 ) eq "_" ) {
|
||||
$protection = "protected";
|
||||
}
|
||||
return ( "$protection retval $name( " . join( ", ", @args ) . " )",
|
||||
$name, @args );
|
||||
}
|
||||
|
||||
## @method emit_class( string class, int line, arrayref doc )
|
||||
# Emit one class definition. If the doc parameter is defined,
|
||||
# emits the array as a comment just before the class definition,
|
||||
# otherwise, only the class definition is emitted.
|
||||
#
|
||||
# @param class the name of the class
|
||||
# @param line the current line number
|
||||
# @param doc (optional) an array with comment lines
|
||||
sub emit_class {
|
||||
my ( $self, $class, $line, $doc ) = @_;
|
||||
|
||||
my ( @current_isa, @current_priv_isa, @current_include, %links );
|
||||
my $file = $self->file_contents();
|
||||
while ( $_ = $file->[ $line++ ] ) {
|
||||
if (/^\s*(?:use base|\@ISA\s*=|\@${class}::ISA\s*=)\s+(.+);/) {
|
||||
push @current_isa, eval $1;
|
||||
$file->[ $line - 1 ] = "\n";
|
||||
}
|
||||
elsif (/^\s*(?:use|require)\s+([\w:]+)/) {
|
||||
my $inc = $1;
|
||||
$links{ $1 || 'public' }{$inc} = $2 . ( $3 ? "\n* $3" : '' )
|
||||
if (
|
||||
/#\s*link\s+(?:(private|protected|public)\s+)?(\S+)(?:\s+(.*))?\s*$/
|
||||
);
|
||||
push @current_priv_isa, $inc if (/#\s*inherits/);
|
||||
$inc =~ s/::/\//g;
|
||||
$inc =~
|
||||
s#Lemonldap/NG/(\w+)#"lemonldap-ng-".lc($1)."/lib/Lemonldap/NG/$1"#e;
|
||||
|
||||
#print STDERR $inc;
|
||||
push @current_include, $inc;
|
||||
$file->[ $line - 1 ] = "\n";
|
||||
}
|
||||
elsif (/^package/) {
|
||||
last;
|
||||
}
|
||||
elsif (/#\s*inherits\s+([\w:]+)/) {
|
||||
push @current_priv_isa, $1;
|
||||
}
|
||||
elsif (
|
||||
/#\s*link\s+([\w:]+)\s+(?:(private|protected|public)\s+)?(\S+)(?:\s+(.*))?\s*$/
|
||||
)
|
||||
{
|
||||
$links{ $2 || 'public' }{$1} = $3 . ( $4 ? "\n* $4" : '' );
|
||||
}
|
||||
}
|
||||
|
||||
$self->print("#include \"$_.pm\"\n") foreach @current_include;
|
||||
$self->print("\n");
|
||||
|
||||
if ($doc) {
|
||||
$self->start( $doc->[0] );
|
||||
$self->more( @$doc[ 1 .. $#$doc ] );
|
||||
$self->end();
|
||||
}
|
||||
die unless($class);
|
||||
$self->print("class $class");
|
||||
|
||||
if ( @current_isa or @current_priv_isa ) {
|
||||
my @tmp;
|
||||
@tmp = map { "public $_" } @current_isa;
|
||||
if ( $ENV{COLLABORATIVE_GRAPH} ) {
|
||||
foreach my $type (qw(public protected private)) {
|
||||
push @tmp, map { "$type $_" } keys %{ $links{$type} };
|
||||
}
|
||||
}
|
||||
push @tmp, map { "private $_" } @current_priv_isa;
|
||||
$self->print( ":", join( ", ", @tmp ) );
|
||||
}
|
||||
$self->print(" {\n");
|
||||
foreach my $target (qw(private protected public)) {
|
||||
if ( $links{$target} ) {
|
||||
$self->print("$target:\n");
|
||||
foreach ( keys %{ $links{$target} } ) {
|
||||
$self->print("/** \@var $_ $links{$target}{$_}\n");
|
||||
$links{$target}{$_} =~ s/\n.*$//s;
|
||||
$self->print("*/\n$_ $links{$target}{$_};\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->print("public:\n") unless ( $links{public} );
|
||||
}
|
||||
|
||||
## @method arrayref file_contents( arrayref contents )
|
||||
# set/get an array containing the whole input file, each
|
||||
# line at one array index.
|
||||
#
|
||||
# @param contents (optional) file array ref
|
||||
# @return The file array ref
|
||||
sub file_contents {
|
||||
my ( $self, $contents ) = @_;
|
||||
|
||||
$self->{"$id file"} = $contents if ( defined $contents );
|
||||
return ( $self->{"$id file"} );
|
||||
}
|
||||
|
||||
## @method munge_parameters($args)
|
||||
# Munge the argument list. Because DoxyGen does not seem to handle $, @ and %
|
||||
# as argument types properly, we replace them with full length strings.
|
||||
#
|
||||
# @param args String specifying anything after a directive
|
||||
# @return Processed string.
|
||||
sub munge_parameters {
|
||||
my ( $this, $args ) = @_;
|
||||
|
||||
$args =~ s/\$\@/scalar_or_list /g;
|
||||
$args =~ s/\@\$/scalar_or_list /g;
|
||||
$args =~ s/\$/scalar /g;
|
||||
$args =~ s/\@/list /g;
|
||||
$args =~ s/\%/hash /g;
|
||||
|
||||
# my ($ret, $remainder) = ($args =~ /^\s*(\S+)(.+)/);
|
||||
# if ($ret) {
|
||||
# if ($ret eq '$') {
|
||||
# $ret = 'scalar';
|
||||
# } elsif ($ret eq '@') {
|
||||
# $ret = 'list';
|
||||
# } elsif ($ret eq '$@') {
|
||||
# $ret = 'scalar_or_list';
|
||||
# } elsif ($ret eq '@$') {
|
||||
# $ret = 'list_or_scalar';
|
||||
# }
|
||||
#
|
||||
# $args = "$ret$remainder";
|
||||
# }
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
# =======================================================================
|
||||
# Doxygen Pre-Processor for Perl
|
||||
# Copyright (C) 2002 Bart Schuller
|
||||
# Copyright (C) 2006 Phinex Informatik AG
|
||||
# All Rights Reserved
|
||||
#
|
||||
# Doxygen Filter is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
# Larry Wall's 'Artistic License' for perl can be found in
|
||||
# http://www.perl.com/pub/a/language/misc/Artistic.html
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# Author: Aeby Thomas, Phinex Informatik AG,
|
||||
# Based on DoxygenFilter from Bart Schuller
|
||||
# E-Mail: tom.aeby@phinex.ch
|
||||
#
|
||||
# Phinex Informatik AG
|
||||
# Thomas Aeby
|
||||
# Kirchweg 52
|
||||
# 1735 Giffers
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# @(#) $Id: SQLFilter.pm,v 1.2 2006/01/31 16:53:52 aeby Exp $
|
||||
#
|
||||
# Revision History:
|
||||
#
|
||||
# $Log: SQLFilter.pm,v $
|
||||
# Revision 1.2 2006/01/31 16:53:52 aeby
|
||||
# added copyright info
|
||||
#
|
||||
#
|
||||
# =======================================================================
|
||||
|
||||
## @file
|
||||
# implementation of DoxyGen::SQLFilter.
|
||||
#
|
||||
|
||||
## @class
|
||||
# Filter from SQL syntax API docs to Doxygen-compatible syntax.
|
||||
# This class is meant to be used as a filter for the
|
||||
# <a href="http://www.doxygen.org/">Doxygen</a> documentation tool.
|
||||
package DoxyGen::SQLFilter;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use base qw(DoxyGen::Filter);
|
||||
|
||||
## @method void filter($infh)
|
||||
# do the filtering.
|
||||
# @param infh input filehandle, normally STDIN
|
||||
sub filter {
|
||||
my ( $self, $infile ) = @_;
|
||||
open( my $infh, $infile );
|
||||
my $current_class;
|
||||
while (<$infh>) {
|
||||
if (/\/\*\*\s*\@(\S+)\s*(.*)/) {
|
||||
my ( $command, $args ) = ( $1, $2 );
|
||||
my @more;
|
||||
while (<$infh>) {
|
||||
if (/\*\//) {
|
||||
|
||||
# We expect to be on the line after a comment.
|
||||
$_ = <$infh>;
|
||||
last;
|
||||
}
|
||||
else {
|
||||
/\s*(\*\s)?(.+)/s;
|
||||
push @more, $2;
|
||||
}
|
||||
}
|
||||
if ( $command eq 'file' ) {
|
||||
$args ||= $infile;
|
||||
$self->start("\@$command $args");
|
||||
$self->more(@more);
|
||||
$self->end;
|
||||
}
|
||||
elsif ( $command eq 'class' ) {
|
||||
unless ($args) {
|
||||
($args) = /package\s(\S*)/;
|
||||
}
|
||||
if ($current_class) {
|
||||
$self->flush;
|
||||
$self->print("}\n");
|
||||
}
|
||||
$current_class = $args;
|
||||
$self->start("\@$command $args")->more(@more);
|
||||
$self->print("\@nosubgrouping")->end;
|
||||
|
||||
$self->print("class $args");
|
||||
$self->print(" {\npublic:\n");
|
||||
}
|
||||
elsif ( $command eq 'fn' ) {
|
||||
unless ($args) {
|
||||
($args) = /function\s+(.*)\b/;
|
||||
$args = "retval $args(\@args)";
|
||||
}
|
||||
$self->push( $self->protection($args) . ' Functions' );
|
||||
$self->start("\@fn $args")->more(@more)->end;
|
||||
$self->print( $args, ";\n" );
|
||||
$self->pop;
|
||||
}
|
||||
else {
|
||||
$self->start("\@$command $args");
|
||||
$self->more(@more);
|
||||
$self->end;
|
||||
}
|
||||
|
||||
# We ate a line when we got the rest of the comment lines
|
||||
redo if defined $_;
|
||||
}
|
||||
elsif (/\@(\w+)/) {
|
||||
my $inc = $1;
|
||||
$self->print("#include \"$inc.sql\"\n");
|
||||
}
|
||||
}
|
||||
if ($current_class) {
|
||||
$self->flush;
|
||||
$self->print("}\n");
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/perl -Iscripts
|
||||
|
||||
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
|
||||
if 0; # not running under some shell
|
||||
|
||||
# =======================================================================
|
||||
# Doxygen Pre-Processor for Perl
|
||||
# Copyright (C) 2002 Bart Schuller
|
||||
# Copyright (C) 2006 Phinex Informatik AG
|
||||
# All Rights Reserved
|
||||
#
|
||||
# Doxygen Filter is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
# Larry Wall's 'Artistic License' for perl can be found in
|
||||
# http://www.perl.com/pub/a/language/misc/Artistic.html
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# Author: Aeby Thomas, Phinex Informatik AG,
|
||||
# Based on DoxygenFilter from Bart Schuller
|
||||
# E-Mail: tom.aeby@phinex.ch
|
||||
#
|
||||
# Phinex Informatik AG
|
||||
# Thomas Aeby
|
||||
# Kirchweg 52
|
||||
# 1735 Giffers
|
||||
#
|
||||
# =======================================================================
|
||||
#
|
||||
# @(#) $Id: doxygenfilter,v 1.3 2006/02/01 12:54:07 aeby Exp $
|
||||
#
|
||||
# Revision History:
|
||||
#
|
||||
# $Log: doxygenfilter,v $
|
||||
# Revision 1.3 2006/02/01 12:54:07 aeby
|
||||
# call pas2dox for .pas files, js2doxy for .js files
|
||||
# add "lib" to the include path
|
||||
#
|
||||
# Revision 1.2 2006/01/31 16:53:28 aeby
|
||||
# parse command line options, understand -h and -v, output a usage message if
|
||||
# command line syntax is not ok
|
||||
# treat input as perl if filename is ending with .pl, .pm or .perl, as sql
|
||||
# if filename ends with .sql, if no file extension is used treat it as perl
|
||||
# if the first line starts with #!....bin.perl. In all other cases just pass
|
||||
# the file through as is.
|
||||
#
|
||||
#
|
||||
# =======================================================================
|
||||
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use lib "lib";
|
||||
use DoxyGen::PerlFilter;
|
||||
use DoxyGen::SQLFilter;
|
||||
use Getopt::Long;
|
||||
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
my $verbose;
|
||||
my $help;
|
||||
unless( GetOptions( "verbose" => \$verbose, "v" => \$verbose,
|
||||
"help" => \$help, "h" => \$help ) && $ARGV[0] ) {
|
||||
$help = 1;
|
||||
}
|
||||
|
||||
if( $help ) {
|
||||
my $prog = $0;
|
||||
$prog =~ s#.*/##;
|
||||
print STDERR <<END;
|
||||
Usage: $prog [-v] filename
|
||||
|
||||
Pre-processes Perl code in file <filename> and outputs
|
||||
something doxygen does understand.
|
||||
|
||||
END
|
||||
exit 1;
|
||||
}
|
||||
|
||||
open( FILE, "<$ARGV[0]" );
|
||||
my $filehead = "";
|
||||
for( my $line=0; ($line<3) && ($_ = <FILE>); $line++ ) {
|
||||
$filehead .= $_;
|
||||
}
|
||||
close FILE;
|
||||
|
||||
my $ext = "";
|
||||
if( $ARGV[0] =~ /\.([a-z]+)$/i ) {
|
||||
$ext = lc($1);
|
||||
}
|
||||
|
||||
my $filter;
|
||||
if( $ext eq "sql" ) {
|
||||
print STDERR "treating file as SQL\n" if( $verbose );
|
||||
$filter = DoxyGen::SQLFilter->new(\*STDOUT);
|
||||
} elsif( grep( $_ eq $ext, "pl", "pm", "perl" )
|
||||
|| $filehead =~ /^#!.{0,10}bin.perl/ ) {
|
||||
print STDERR "treating file as Perl\n" if( $verbose );
|
||||
$filter = DoxyGen::PerlFilter->new(\*STDOUT);
|
||||
}
|
||||
elsif( $ext eq "js" ) {
|
||||
print STDERR "treating file as JavaScript\n" if( $verbose );
|
||||
exec( "js2doxy", @ARGV ) or exec( "js2doxypl", @ARGV )
|
||||
or print STDERR "js2doxy not installed? - see http://jsunit.berlios.de/internal.html\n";
|
||||
}
|
||||
elsif( $ext eq "pas" ) {
|
||||
print STDERR "treating file as Pascal\n" if( $verbose );
|
||||
exec( "pas2dox", @ARGV )
|
||||
or print STDERR "pas2dox not installed? - see http://sourceforge.net/projects/pas2dox/\n";
|
||||
}
|
||||
|
||||
if( $filter ) {
|
||||
$filter->filter($ARGV[0]);
|
||||
}
|
||||
else {
|
||||
print STDERR "passing file through\n" if( $verbose );
|
||||
print <>;
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
|
||||
my $errorMsg;
|
||||
|
||||
foreach my $module (qw(common handler manager portal)) {
|
||||
open CMD,
|
||||
"find lemonldap-ng-$module/lib/Lemonldap/NG -type f -name '*.pm'|";
|
||||
my @files;
|
||||
while (<CMD>) {
|
||||
chomp;
|
||||
push @files, $_;
|
||||
}
|
||||
close CMD;
|
||||
|
||||
#my @files = qw(lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthChoice.pm);
|
||||
foreach my $file (@files) {
|
||||
open F, $file;
|
||||
$file =~ s#.*/NG/##;
|
||||
$_ = <F>;
|
||||
unless (/^##\s*\@file/) {
|
||||
push @{ $errorMsg->{$module}->{undocumented} }, $file;
|
||||
next;
|
||||
}
|
||||
my $autoload = 0;
|
||||
while (<F>) {
|
||||
next if /^(?:\s*#|\*lmLog|sub lmLog)/;
|
||||
$autoload = 1 if (/use\s+AutoLoader/);
|
||||
last if ( /^__END__$/ and not $autoload );
|
||||
next unless (/abort|lmLog|STDERR/);
|
||||
if (/lmLog/) {
|
||||
$_ .= <F> while ( !/[\)\}];/s );
|
||||
}
|
||||
else {
|
||||
$_ .= <F> while ( !/(?:\s+if\s*\()?;$/ );
|
||||
}
|
||||
$_ =~ s/\n//gs;
|
||||
my ( $msg, $level );
|
||||
if (/lmLog/) {
|
||||
/lmLog\s*\(\s*(.+?)\s*,\s*(['"])(info|notice|warn|error)\2/s
|
||||
or next;
|
||||
( $msg, $level ) = ( $1, $3 );
|
||||
}
|
||||
elsif (/abort/) {
|
||||
/abort\s*\(\s*(.+?)\s*(?:,\s*(.+?)\s*)?\)/s or next;
|
||||
( $msg, $level ) = ( "$1 ($2)", 'abort' );
|
||||
}
|
||||
else {
|
||||
$level = 'error';
|
||||
/STDERR\s+(.*)(?:\s+if\s*\()?;$/ or next;
|
||||
$msg = $1;
|
||||
}
|
||||
push @{ $errorMsg->{$module}->{$level} }, $msg;
|
||||
}
|
||||
close F;
|
||||
}
|
||||
print "\n###### " . uc($module) . " ######\n";
|
||||
foreach ( @{ $errorMsg->{$module}->{undocumented} } ) {
|
||||
print "## No Doxygen ## $_\n";
|
||||
}
|
||||
foreach my $level (qw(abort error warn notice info)) {
|
||||
my $last = '';
|
||||
next unless ( ref( $errorMsg->{$module}->{$level} ) );
|
||||
foreach ( sort ( @{ $errorMsg->{$module}->{$level} } ) ) {
|
||||
print "[$level] $_\n" unless ( $_ eq $last );
|
||||
$last = $_;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue