Class::Bits 0.05

Class::Bits 0.05

Sponsored Links

Class::Bits 0.05 Ranking & Summary

Ranking Click at the star to rankRanking level:
User Review: 0 (0 times) Download now
File size: 0.004 MB Platform: Any Platform License: Perl Artistic License Price: Downloads: 6625 Date added: 2007-07-30 Publisher: Salvador FandiƱo Publisher URL: http://search.cpan.org/~s

Class::Bits 0.05 description

Class::Bits is a Perl module with class wrappers around bit vectors.

SYNOPSIS

package MyClass;
use Class::Bits;

make_bits( a => 4, # 0..15
b => 1, # 0..1
c => 1, # 0..1
d => 2, # 0..3
e => s4 # -8..7
f => s1 # -1..0
);

package;

$o=MyClass->new(a=>12, d=>2);
print "o->b is ", $o->b, "n";

print "bit vector is ", unpack("h*", $$o), "n";

$o2=$o->new();
$o3=MyClass->new($string);

ABSTRACT

Class::Bits creates class wrappers around bit vectors.

Class::Bits defines classes using bit vectors as storage.
Object attributes are stored in bit fields inside the bit vector. Bit field sizes have to be powers of 2 (1, 2, 4, 8, 16 or 32).

There is a class constructor subroutine:

make_bits( field1 => size1, field2 => size2, ...)

exports in the calling package a ctor, accessor methods, some utility methods and some constants:

Sizes can be prefixed by s or u to define signedness of the field. Default is unsigned.

$class->new()

creates a new object with all zeros.

$class->new($bitvector)

creates a new object over $bitvector.

$class->new(%fields)

creates a new object and initializes its fields with the values in %fields.

$obj->new()

clones an object.

$obj->$field()
$obj->$field($value)

gets or sets the value of the bit field $field inside the bit vector.

$class->length
$obj->lenght

returns the size in bits of the bit vector used for storage.

$class->keys
$obj->keys

returns an array with the names of the object attributes

$obj->as_hash

returns a flatten hash with the object attributes, i.e.:
my %values=$obj->as_hash;

%INDEX

hash with offsets as used by vec perl operator (to get an offset in bits, the value has to be multiplied by the corresponding bit field size).

%SIZES

hash with bit field sizes in bits.

%SIGNED

hash with signedness of the fields

Bit fields are packed in the bit vector in the order specified as arguments to make_bits.

Bit fields are padded inside the bit vector, i.e. a class created like

make_bits(A=>1, B=>2, C=>1, D=>4, E=>8, F=>16);

will have the layout

AxBBCxxx DDDDxxxx EEEEEEEE xxxxxxxx FFFFFFFF FFFFFFFF

Download now

Class::Bits 0.05 Screenshot

Sponsored Links
Download Class::Bits 0.05

Class::Bits 0.05 Keywords

Bookmark Class::Bits 0.05

Hyperlink code:
Hyperlink and Intro code:

Class::Bits 0.05 Copyright

WareSeeker periodically updates pricing and software information of Class::Bits 0.05 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Class::Bits 0.05 Edition. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Class::Bits 0.05 Related Software


xCHM is a cross-platform GUI front-end to chmlib, with borrowed bits from Pabs chmdeco project.

Greasemonkey allows you to customize the way a webpage displays using small bits of JavaScript.

Actual-X allows broadcasters to use available sound-bits in their broadcasts.

Coinflip provides a cryptographically secure server/client program and protocol for choosing random bits.

Class::HPLOO is an easier way to declare classes on Perl, based in the popular class {...} style and ePod.

SVG::Element is a Perl module to generate the element bits for SVG.pm.

Class::DBI::AutoIncrement is a Perl module to emulate auto-incrementing columns on Class::DBI subclasses.

Class::DBI::ConceptSearch is a Perl module to retrieve Class::DBI aggregates from high-level conceptual searches.

File::Stat::Bits - stat bit mask constants.

OutGuess is a universal tool that allows the insertion of hidden information into the redundant bits of data sources.
Class::Bits 0.05 Review:
Author name* :  
Author Email* :  
Comment* :  
Security code* :  
     
   
My Software
You have not saved any software. Click "Save" next to each software to save it to your software basket
Related Information
Sponsored Links
TOP POPULAR DOWNLOAD