line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: cperl; mode: folding; -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::TrailGoForward; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
6
|
|
|
|
|
|
|
# Nigel Hamilton |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
9
|
|
|
|
|
|
|
# All Rights Reserved |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
12
|
|
|
|
|
|
|
# Filename: Goo::TrailGoForward.pm |
13
|
|
|
|
|
|
|
# Description: Jump backwards in the Goo Trail |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Date Change |
16
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
17
|
|
|
|
|
|
|
# 21/08/2005 Deleted method: generateProfile |
18
|
|
|
|
|
|
|
# 21/08/2005 Deleted method: showProfile |
19
|
|
|
|
|
|
|
# 21/08/2005 Deleted method: getGooTrailTable |
20
|
|
|
|
|
|
|
# |
21
|
|
|
|
|
|
|
############################################################################### |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
3265
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
|
6
|
use Goo::Object; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
22
|
|
26
|
1
|
|
|
1
|
|
6
|
use Goo::LiteDatabase; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
27
|
1
|
|
|
1
|
|
7
|
use Goo::Thing::gml::Writer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
6
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
222
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
############################################################################### |
33
|
|
|
|
|
|
|
# |
34
|
|
|
|
|
|
|
# run - go forward!! |
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
############################################################################### |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub run { |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
|
my ($this, $thing) = @_; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
$thing->{end_position} = $thing->{end_position} + $thing->{buffer_size}; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $max_actionid = Goo::LiteDatabase::get_max("actionid", "gootrail"); |
45
|
|
|
|
|
|
|
|
46
|
0
|
0
|
|
|
|
|
if ($thing->{end_position} > $max_actionid) { |
47
|
0
|
|
|
|
|
|
$thing->{end_position} = $max_actionid; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$thing->{start_position} = $thing->{end_position} - $thing->{buffer_size}; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# update the thing! |
53
|
0
|
|
|
|
|
|
Goo::Thing::gml::Writer::write($thing, $thing->get_full_path()); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# OK show the profile again |
56
|
0
|
|
|
|
|
|
$thing->do_action("P"); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Goo::TrailGoForward - Jump forwards in the Goo Trail |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use Goo::TrailGoForward; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 DESCRIPTION |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Action handler for moving forward in the Trail (i.e., [F]orward) |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 METHODS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=over |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item run |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Go forward in the Trail. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 AUTHOR |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SEE ALSO |
93
|
|
|
|
|
|
|
|