File: IO.pm

package info (click to toggle)
libxtm-perl 0.37-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,536 kB
  • ctags: 410
  • sloc: perl: 23,045; makefile: 37
file content (116 lines) | stat: -rw-r--r-- 2,041 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package XTM::IO;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);

require Exporter;
require AutoLoader;

@ISA = qw(Exporter AutoLoader);
@EXPORT = qw( );
$VERSION = '0.02';

=pod

=head1 NAME

XTM::IO - Topic Map management, abstract class for input/output

=head1 SYNOPSIS

  # this class will never be directly used

=head1 DESCRIPTION

This is the abstract class defining how an IO package should behave and may
thus be inherited by classes which implement external formats (L<XTM::AsTMa>,
L<XTM::XML>).

=head1 INTERFACE

=head2 Constructor

The constructor should expect a hash as parameter containing at least the following fields:

=over

=item I<auto_complete> (default: 1)
    If C<auto_complete> is set, the loading mechanism is directed to automatically generate
    all topics which are referenced in a map but which are not explicitely defined. It is
    up to the implementation how these topics are created and which characteristics they have.

=back

=cut

sub new {
  die "XTM::IO: constructor not defined"
}

=pod

=head2 Methods

The methods C<sync_in>, C<sync_out> and C<last_mod> implement the methods from
the abstract class L<XTM::IO>

=over

=item C<last_mod>

returns the UNIX time when the resource has been modified last. C<undef> is
returned if the result cannot be determined.


=cut

sub last_mod {
  die "XTM::IO: Do not call this abstract method.";
}

=pod

=item C<sync_in>

actually loads an XTM resource and returns a L<XTM::Memory> object.


=cut

sub sync_in {
  die "XTM::IO: Do not call this abstract method.";
}

=pod

=item C<sync_out>

is supposed to save the L<XTM::Memory> content onto the resource.

=cut

sub sync_out {
  die "XTM::IO: Do not call this abstract method.";
}

=pod

=back

=head1 SEE ALSO

L<XTM>

=head1 AUTHOR INFORMATION

Copyright 2002, Robert Barta <rho@telecoma.net>, All rights reserved.

This library is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html

=cut

1;

__END__