New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Mirror.pm in vendors/lib/FCM/Context/Make – NEMO

source: vendors/lib/FCM/Context/Make/Mirror.pm @ 10669

Last change on this file since 10669 was 10669, checked in by nicolasmartin, 5 years ago

Import latest FCM release from Github into the repository for testing

File size: 3.0 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) British Crown Copyright 2006-17 Met Office.
3#
4# This file is part of FCM, tools for managing and building source code.
5#
6# FCM is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# FCM is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with FCM. If not, see <http://www.gnu.org/licenses/>.
18# ------------------------------------------------------------------------------
19use strict;
20use warnings;
21# ------------------------------------------------------------------------------
22package FCM::Context::Make::Mirror;
23use base qw{FCM::Class::HASH};
24
25use FCM::Context::Make;
26
27use constant {ID_OF_CLASS => 'mirror'};
28
29__PACKAGE__->class({
30    dest           => '$',
31    id             => {isa => '$', default => ID_OF_CLASS},
32    id_of_class    => {isa => '$', default => ID_OF_CLASS},
33    prop_of        => '%',
34    status         => {isa => '$', default => FCM::Context::Make->ST_UNKNOWN},
35    target_logname => '$',
36    target_machine => '$',
37    target_path    => '$',
38});
39
40# ------------------------------------------------------------------------------
411;
42__END__
43
44=head1 NAME
45
46FCM::Context::Make::Mirror
47
48=head1 SYNOPSIS
49
50    use FCM::Context::Make::Mirror;
51    my $ctx = FCM::Context::Make::Mirror->new();
52    $ctx->set_dest_path($dest_path);
53    $ctx->set_source_path($source_path);
54    # ...
55
56=head1 DESCRIPTION
57
58Provides a context object for the mirror sub-system.
59
60=head1 ATTRIBUTES
61
62This class is based on L<FCM::Class::HASH|FCM::Class::HASH>. All attributes are
63accessible via $ctx->get_$attrib() and $ctx->set_$attrib($value) methods.
64
65=over 4
66
67=item dest
68
69The local working directory for the mirror sub-system.
70
71=item id
72
73The ID of the context. (default="mirror")
74
75=item id_of_class
76
77The class ID of the context. (default="mirror")
78
79=item prop_of
80
81A HASH containing the named properties (i.e. options and settings of named
82external tools). Expects a value to be an instance of
83L<FCM::Context::Make::Share::Property|FCM::Context::Make::Share::Property>.
84
85=item status
86
87The status of the context. See L<FCM::Context::Make|FCM::Context::Make> for the
88status constants.
89
90=item target_logname
91
92The logname part of the authority of the mirror destination.
93
94=item target_machine
95
96The machine part of the authority of the mirror destination.
97
98=item target_path
99
100The container path of the mirror destination (without the authority).
101
102=back
103
104=head1 CONSTANTS
105
106=over 4
107
108=item ID_OF_CLASS
109
110The default value of the "id" attribute (of an instance), and the ID of the
111functional class. ("mirror")
112
113=back
114
115=head1 COPYRIGHT
116
117(C) Crown copyright Met Office. All rights reserved.
118
119=cut
Note: See TracBrowser for help on using the repository browser.