Print the legend for the given node, including I<@fields> in the given
language I<$lang>, and excluding the fields, that have no meaning for
this node.
=cut
sub PrintLegend {
my ($self, $lang, @fields) = @_;
my $result = '\item['.$self->GetGenName().'] ';
my @desc;
foreach my $field (@fields) {
if (exists $self->{$field} && ($field ne 'DoD') &&
($field ne 'AgeAtDeath')) {
my $res = $lang->PrintField($field, $self->{$field});
if (length($res)>0) {
push @desc, $res;
}
}
}
$result .= join ("; ",@desc);
$result .= ".\n";
#
# We print only the nodes, for which there is an information
#
if (scalar @desc) {
return $result;
}
return;
}
####################################################################
# THE END #
####################################################################
=pod
=back
=head1 ENVIRONMENT
The calling program should define B<$main::DEBUG> and set it to 0
or 1.