From ef40feb961f363029d98524b62a38a977823bb2b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 18 Apr 2015 20:28:49 +0200 Subject: Start work on wings support --- lib/Travel/Status/DE/IRIS/Result.pm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'lib/Travel/Status/DE/IRIS/Result.pm') diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index d4e3821..e49750f 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -323,6 +323,20 @@ sub set_tl { return $self; } +sub add_arrival_wingref { + my ( $self, $ref ) = @_; + + weaken($ref); + push( @{ $self->{arrival_wings} }, $ref ); +} + +sub add_departure_wingref { + my ( $self, $ref ) = @_; + + weaken($ref); + push( @{ $self->{departure_wings} }, $ref ); +} + # List::Compare does not keep the order of its arguments (even with unsorted). # So we need to re-sort all stops to maintain their original order. sub sorted_sublist { @@ -434,6 +448,24 @@ sub delay_messages { return @ret; } +sub arrival_wings { + my ($self) = @_; + + if ( $self->{arrival_wings} ) { + return @{ $self->{arrival_wings} }; + } + return; +} + +sub departure_wings { + my ($self) = @_; + + if ( $self->{departure_wings} ) { + return @{ $self->{departure_wings} }; + } + return; +} + sub dump_message_codes { my ($self) = @_; -- cgit v1.2.3