Go to the documentation of this file.00001 package Doxygen::POD::Item::Format;
00002
00003 =head1 NAME
00004
00005 Doxygen::POD::Item::Format - Perl extension for generating Doxygen documentation
00006
00007 =head1 SYNOPSIS
00008
00009 my $item = new Doxygen::POD::Item::Format;
00010
00011 =head1 ABSTRACT
00012
00013 A POD =begin/=end/=for block.
00014
00015 =head1 DESCRIPTION
00016
00017 =head1 METHODS
00018
00019 =over
00020
00021 =cut
00022
00023 use 5.005; # just to pick something, but not really tested
00024 use strict;
00025 use warnings;
00026
00027 use base qw(Doxygen::POD::Item);
00028
00029 our $VERSION = '0.01';
00030
00031 ###########################################################################
00032 ###########################################################################
00033
00034 =item C<generate($self, %flags)>
00035
00036 Generates output understandable by doxygen to standard output.
00037
00038 =cut
00039
00040 sub generate
00041 {
00042 my $self = shift;
00043 my $fmt = $self->{_fmt_};
00044
00045 if ($fmt =~ /^html?$/i) {
00046 Doxygen::Item::genThing("\@htmlonly\n", @_);
00047 } elsif ($fmt =~ /^latex$/i) {
00048 Doxygen::Item::genThing("\@latexonly\n", @_);
00049 } elsif ($fmt !~ /^doxygen$/i) {
00050 my %flags = @_;
00051 my $source = $flags{source};
00052
00053 $source->log('W', 'Unrecognized format: ', $self->{_fmt_});
00054
00055 return;
00056 }
00057
00058 my %flags = @_;
00059 my $which = $flags{which} || 'text';
00060
00061 $flags{which} = $which unless defined $flags{which};
00062
00063 Doxygen::Item::genThing($_, %flags)
00064 for @{$self->text($which)};
00065
00066 if ($fmt =~ /^html?$/i) {
00067 Doxygen::Item::genThing("\@endhtmlonly\n", @_);
00068 } elsif ($fmt =~ /^latex$/i) {
00069 Doxygen::Item::genThing("\@endlatexonly\n", @_);
00070 }
00071 }
00072
00073 ###########################################################################
00074 ###########################################################################
00075
00076 1
00077
00078 __END__
00079
00080 =back
00081
00082 =head1 SEE ALSO
00083
00084 DoxyFilt.pl Doxygen::Item Doxygen::POD::Item
00085
00086 =head1 AUTHOR
00087
00088 Marc M. Adkins, L<mailTo:Perl@Doorways.org>
00089
00090 =head1 COPYRIGHT AND LICENSE
00091
00092 Copyright 2004 by Marc M. Adkins
00093
00094 This library is free software; you can redistribute it and/or modify
00095 it under the same terms as Perl itself.
00096
00097 =cut