4 CXGN::Cview::ChrLinkList - a class to handle a list of CXGN::Cview::ChrLink objects
8 Lukas Mueller <lam87@cornell.edu>
12 This class implements the following functions:
18 package CXGN
::Cview
::ChrLinkList
;
22 Usage: my $link_list = CXGN::Cview::ChrLinkList->new();
23 Desc: generates a new link list object.
32 my $self = bless {}, $class;
36 =head2 function add_link()
38 Usage: $link_list->add_link($marker_name, $link_object)
39 Desc: adds another CXGN::Cview::ChrLink object to the list
41 Args: a marker name [string], a link list object
42 [CXGN::Cview::ChrList]
43 Side Effects: the link is added to the list...
50 my $marker_name = shift;
51 my $link_object = shift;
52 #print STDERR "adding link for marker $marker_name...\n";
53 $self->{links
}->{$marker_name} = $link_object;
57 =head2 function has_link()
59 Usage: my $flag = $map_link->has_link($marker_name)
60 Desc: checks if the marker named $marker_name has
61 a corresponding link object in the list
63 Args: a marker name [string
71 my $marker_name = shift;
72 if (exists($self->{links
}->{$marker_name})) {
79 =head2 function get_link_list()
81 Usage: my @link_list = $link_list->get_link_list()
83 Ret: returns the list of link objects as a list
92 # if (!exists($self->{links}) || !defined($self->{links})) {
95 my @link_objects = ();
96 foreach my $name (keys(%{$self->{links
}})) {
97 #print STDERR "Pushing $name...\n\n";
98 push @link_objects, $self->{links
}->{$name};
101 return @link_objects;