Bundesamt für Sicherheit in der Informationstechnik > Dicop-Server-3.04 > Dicop::Data::Chunk::Checklist

Download:
dicop/Dicop-Server-3.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.01   Source  

NAME ^

Dicop::Data::Chunk::Checklist - a chunk in the checklist of a Job in the Dicop system.

SYNOPSIS ^

        use Dicop::Data::Chunk::Checklist;
        use Dicop qw(TOBEDONE);

        $chunk = Dicop::Data::Chunk::Checklist->new (
                        start => 'aaa', end => 'zzz',
                        job => $job, status => TOBEDONE, ); 

REQUIRES ^

perl5.005, Exporter, Dicop, Dicop::Event, Dicop::Data, Math::BigInt, Math::String, Digest::MD5

EXPORTS ^

Exports nothing on default.

DESCRIPTION ^

This is a subclass of Dicop::Data::Chunk and used to store in the checklist of a job. These chunks are mostly like all other chunks, but are marked as belonging to the checklist by their classname.

In addition, they also have some additional methods that are only necessary for chunks in the checklist, namely shrink().

METHODS ^

In addition to the normal methods of Dicop::Data::Chunk, the following methods are overwritten or new:

shrink

        $self->shrink($result,$factor,$fixed);

Takes the chunk and a result between start and end and shrinks the chunk around the result to 1/$factor of the original size. Also takes care to round the new borders up and down, respectively, so that the new chunk size is always smaller or equal to the old one. Also takes care of "fixed chars" at the two new borders.

Example for $factor == 10:

        original start  <--|
                           | 9/20
        new start       <--|            <---|
                           | 1/20           | new size:
        result          <--|                | 2/20 == 1/10
                           | 1/20           |
        new end         <--|            <---|
                           | 9/20
        original end    <--|

Return error string on error, otherwise $self.

BUGS ^

None known yet.

AUTHOR ^

(c) Bundesamt fuer Sicherheit in der Informationstechnik 1998-2006

DiCoP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

See http://www.bsi.de/ for more information.