The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Meta::Ds::Ochash - Ordered hash data structure with parent conectivity.

COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

DETAILS

        MANIFEST: Ochash.pm
        PROJECT: meta
        VERSION: 0.15

SYNOPSIS

        package foo;
        use Meta::Ds::Ochash qw();

DESCRIPTION

This is an object which is a hash table which can also give you a random element. Any child must inherit from Meta::Ds::Connected and thus be able to retrieve its parent.

FUNCTIONS

        new($)
        insert($$$)
        remove($$)
        elem($$)
        key($$)
        val($$)
        print($$)
        get_elem_number($$)
        TEST($)

FUNCTION DOCUMENTATION

new($)

Gives you a new Ochash object.

insert($$$)

Inserts an element into the hash. This just does a Hash insert and updates the list if the hash was actually inserted.

remove($$)

Remove an element from the hash. This just calls the Meta::Ds::Hash remove and removes the element from the list if it was successful.

elem($$)

This returns a specific element in the hash.

key($$)

This returns the key with the specified number.

val($$)

This returns the value with the specified number.

print($$)

This will print the Ochash object to the specified file for you.

get_elem_number($$)

This method will retrieve the sequential number of an element.

TEST($)

Test suite for this module.

SUPER CLASSES

Meta::Ds::Hash(3)

BUGS

None.

AUTHOR

        Name: Mark Veltzer
        Email: mailto:veltzer@cpan.org
        WWW: http://www.veltzer.org
        CPAN id: VELTZER

HISTORY

        0.00 MV db stuff
        0.01 MV finish db export
        0.02 MV PDMT/SWIG support
        0.03 MV perl packaging
        0.04 MV md5 project
        0.05 MV database
        0.06 MV perl module versions in files
        0.07 MV movies and small fixes
        0.08 MV graph visualization
        0.09 MV more thumbnail stuff
        0.10 MV thumbnail user interface
        0.11 MV more thumbnail issues
        0.12 MV website construction
        0.13 MV web site automation
        0.14 MV SEE ALSO section fix
        0.15 MV md5 issues

SEE ALSO

Meta::Ds::Hash(3), strict(3)

TODO

-add/subtract a hash.

-read/write a hash from a file.

-get a list from a hash.

-get a set from a hash.

-get a hash from a list.

-get a hash from a set.

-insert an element and make sure that he wasnt there.

-remove an element and make sure that he was there.

-add a limitation on the types of objects going into the hash (they must be inheritors from some kind of object).