| 1 | package Crop::Algorithm::TreeSortedPID::Tree; | ||
| 2 | use base qw/ Crop::Object::Sequence /; | ||
| 3 | |||
| 4 | =begin nd | ||
| 5 | Class: Crop::Algorithm::TreeSortedPID::Tree | ||
| 6 | =cut | ||
| 7 | |||
| 8 | use v5.14; | ||
| 9 | use warnings; | ||
| 10 | |||
| 11 | use Crop::Error; | ||
| 12 | |||
| 13 | =begin nd | ||
| 14 | Method: node_attr ( ) | ||
| 15 | Get attribute that presents node in tree. | ||
| 16 | |||
| 17 | Pure virtual. | ||
| 18 | |||
| 19 | Returns: | ||
| 20 | An error - since has not redefined in subclass | ||
| 21 | Attribute - if Ok | ||
| 22 | =cut | ||
| 23 | sub node_attr { | ||
| 24 | my $self = shift; | ||
| 25 | |||
| 26 | $self->Attributes->first(tree => 'node') or return warn 'ALGORITHM|ERR: No node for tree found'; | ||
| 27 | } | ||
| 28 | |||
| 29 | 1; |