[Bio] / FigKernelPackages / FigSubsystemMaster.pm Repository:
ViewVC logotype

View of /FigKernelPackages/FigSubsystemMaster.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Tue Sep 9 20:54:31 2008 UTC (11 years, 7 months ago) by parrello
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
Deleted: obsolete.

#!/usr/bin/perl -w

package FigSubsystemMaster;

    use strict;
    use Tracer;
    use FIG;
    use FigSubsystem;

=head1 FIG Subsystem Master Object

=head2 Introduction

The FIG Subsystem Master Object is used to access the FIG data store in order to
get data relating to subsystems as a whole. It is also used to create
B<FigSubsystem> objects for individual subsystems.

=cut

=head2 Public Methods

=head3 new

    my $$mso = FigSubsystemMaster->new(%options);

Construct a new FigSubsystemMaster object.

=over 4

=item options

Hash of options. Currently no options are supported.

=back

=cut

sub new {
    # Get the parameters.
    my ($class, %options) = @_;
    # Get the FIG object.
    my $fig = FIG->new();
    # Create the $mso object.
    my $retVal = {
                  fig => $fig
                 };
    # Bless and return it.
    bless $retVal, $class;
    return $retVal;
}

=head3 GetSubsystem

    my $lso = $mso->GetSubsystem($name);

Return a FigSubsystem object for the specified subsystem.

=over 4

=item name

Name of the desired subsystem. This can either be the subsystem ID (with underscores) or the display
name (with spaces).

=item RETURN

Returns an object representing the chosen subsystem.

=back

=cut

sub GetSubsystem {
    # Get the parameters.
    my ($self, $name) = @_;
    # Create a subsystem object.
    my $retVal = FigSubsystem->new($name, $self->{fig});
}

=head3 GetAllSubsystems

    my @subsystemNames = $mso->GetAllSubsystems();

Return a list of all the subsystems.

=cut

sub GetAllSubsystems {
    # Get the parameters.
    my ($self) = @_;
    # Get the subsystem list from FIG.
    my $fig = $self->{fig};
    my @retVal = $fig->all_subsystems();
    # Return it.
    return @retVal;
}


1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3