Changeset 167


Ignore:
Timestamp:
12/19/05 19:57:53 (18 years ago)
Author:
thauvin
Message:
  • add documentation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/soft/ObsData/ObsData/Event.pm

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r166 r167  
    55 
    66package ObsData::Event; 
     7 
     8=head1 NAME 
     9 
     10ObsData::Event - A simple class to manage message between backend 
     11and main software. 
     12 
     13=head1 SYNOPSIS 
     14 
     15    my $callback = sub { 
     16        my ($events) = @_; 
     17        print $events->message . "\n"; 
     18    } 
     19 
     20    my $oe = ObsData::Event->new('id', 'what should I do'); 
     21 
     22    $callback($oe); 
     23 
     24=head1 METHODS 
     25 
     26=head2 new($id $message) 
     27 
     28Create a new ObsData::Event object to handle $message with $id 
     29 
     30=cut 
    731 
    832sub new { 
     
    2448} 
    2549 
     50=head2 id 
     51 
     52Return the id of the object 
     53 
     54=cut 
     55 
    2656sub id { 
    2757    my ($self) = @_; 
     
    2959} 
    3060 
     61=head2 message 
     62 
     63Return the message handle by the object 
     64 
     65=cut 
     66 
    3167sub message { 
    3268    my ($self) = @_; 
    3369    return($self->{message}); 
    3470} 
     71 
     72=head2 add_test($test_id, $message, $result) 
     73 
     74Add a new test into the object. 
     75 
     76=cut 
    3577 
    3678sub add_test { 
     
    4385} 
    4486 
     87=head2 list_test 
     88 
     89List test currently stored into the object. Return the list of test id. 
     90 
     91=cut 
     92 
    4593sub list_test { 
    4694    my ($self) = @_; 
     
    4896} 
    4997 
     98=head2 test_message($test_id) 
     99 
     100Return the message associated to a test. 
     101 
     102=cut 
     103 
    50104sub test_message { 
    51105    my ($self, $test_id) = @_; 
    52106    return($self->{test}{$test_id}{message}); 
    53107} 
     108 
     109=head2 test_result($test_id) 
     110 
     111Return the result associated to a test 
     112 
     113=cut 
    54114 
    55115sub test_result { 
     
    601201; 
    61121 
     122__END__ 
     123 
     124=head1 AUTHOR 
     125 
     126Olivier Thauvin <olivier.thauvin@aerov.jussieu.fr> 
     127 
     128=cut 
Note: See TracChangeset for help on using the changeset viewer.