source: branches/UKMO/r6232_tracer_advection/NEMOGCM/EXTERNAL/fcm/lib/Fcm/Keyword/Formatter/Entry/Location.pm @ 9295

Last change on this file since 9295 was 9295, checked in by jcastill, 3 years ago

Remove svn keywords

File size: 1.8 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) Crown copyright Met Office. All rights reserved.
3# For further details please refer to the file COPYRIGHT.txt
4# which you should have received as part of this distribution.
5# ------------------------------------------------------------------------------
6use strict;
7use warnings;
8
9package Fcm::Keyword::Formatter::Entry::Location;
10use base qw{Fcm::Keyword::Formatter::Entry};
11
12use Fcm::Config;
13use Fcm::Keyword::Formatter::Entries;
14
15################################################################################
16# Formats a keyword entry
17sub format {
18    my ($self, $entry) = @_;
19    my $return = $self->SUPER::format($entry);
20    for my $implied_entry (@{$entry->get_implied_entry_list()}) {
21        $return .= $self->SUPER::format($implied_entry);
22    }
23    if (@{$entry->get_revision_entries()->get_all_entries()}) {
24        my $formatter = Fcm::Keyword::Formatter::Entries->new();
25        $return .= "\n[revision keyword]\n";
26        $return .= $formatter->format($entry->get_revision_entries());
27    }
28    return $return;
29}
30
311;
32__END__
33
34=head1 NAME
35
36Fcm::Keyword::Formatter::Entry::Location
37
38=head1 SYNOPSIS
39
40    use Fcm::Keyword::Formatter::Entry::Location;
41    $formatter = Fcm::Keyword::Formatter::Entry::Location->new();
42    print($formatter->format($entry));
43
44=head1 DESCRIPTION
45
46An object of this class is used to format the detail in a location keyword entry.
47
48=head1 METHODS
49
50=over 4
51
52=item new()
53
54Constructor.
55
56=item format($entry)
57
58Returns a string representation of $entry.
59
60=back
61
62=head1 SEE ALSO
63
64L<Fcm::Keyword::Entry|Fcm::Keyword::Entry>,
65L<Fcm::Keyword::Formatter::Entry|Fcm::Keyword::Formatter::Entry>,
66L<Fcm::Keyword::Formatter::Entries|Fcm::Keyword::Formatter::Entries>
67
68=head1 COPYRIGHT
69
70E<169> Crown copyright Met Office. All rights reserved.
71
72=cut
Note: See TracBrowser for help on using the repository browser.