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 | # ------------------------------------------------------------------------------ |
---|
19 | use strict; |
---|
20 | use warnings; |
---|
21 | # ------------------------------------------------------------------------------ |
---|
22 | package FCM::Context::Make::Mirror; |
---|
23 | use base qw{FCM::Class::HASH}; |
---|
24 | |
---|
25 | use FCM::Context::Make; |
---|
26 | |
---|
27 | use 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 | # ------------------------------------------------------------------------------ |
---|
41 | 1; |
---|
42 | __END__ |
---|
43 | |
---|
44 | =head1 NAME |
---|
45 | |
---|
46 | FCM::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 | |
---|
58 | Provides a context object for the mirror sub-system. |
---|
59 | |
---|
60 | =head1 ATTRIBUTES |
---|
61 | |
---|
62 | This class is based on L<FCM::Class::HASH|FCM::Class::HASH>. All attributes are |
---|
63 | accessible via $ctx->get_$attrib() and $ctx->set_$attrib($value) methods. |
---|
64 | |
---|
65 | =over 4 |
---|
66 | |
---|
67 | =item dest |
---|
68 | |
---|
69 | The local working directory for the mirror sub-system. |
---|
70 | |
---|
71 | =item id |
---|
72 | |
---|
73 | The ID of the context. (default="mirror") |
---|
74 | |
---|
75 | =item id_of_class |
---|
76 | |
---|
77 | The class ID of the context. (default="mirror") |
---|
78 | |
---|
79 | =item prop_of |
---|
80 | |
---|
81 | A HASH containing the named properties (i.e. options and settings of named |
---|
82 | external tools). Expects a value to be an instance of |
---|
83 | L<FCM::Context::Make::Share::Property|FCM::Context::Make::Share::Property>. |
---|
84 | |
---|
85 | =item status |
---|
86 | |
---|
87 | The status of the context. See L<FCM::Context::Make|FCM::Context::Make> for the |
---|
88 | status constants. |
---|
89 | |
---|
90 | =item target_logname |
---|
91 | |
---|
92 | The logname part of the authority of the mirror destination. |
---|
93 | |
---|
94 | =item target_machine |
---|
95 | |
---|
96 | The machine part of the authority of the mirror destination. |
---|
97 | |
---|
98 | =item target_path |
---|
99 | |
---|
100 | The 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 | |
---|
110 | The default value of the "id" attribute (of an instance), and the ID of the |
---|
111 | functional class. ("mirror") |
---|
112 | |
---|
113 | =back |
---|
114 | |
---|
115 | =head1 COPYRIGHT |
---|
116 | |
---|
117 | (C) Crown copyright Met Office. All rights reserved. |
---|
118 | |
---|
119 | =cut |
---|