Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.546.639 Times

Class::Bits 0.05

  Date Added: November 06, 2010  |  Visits: 673

Class::Bits

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 downloads)



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.

Requirements: No special requirements
Platforms: Linux
Keyword: Bit Bit Field Bit Vector Bits Class Classbits Field Libraries Myclass New Object Perl Module Programming
Users rating: 0/10

License: Freeware Size: 4.1 KB
USER REVIEWS
More Reviews or Write Review


CLASS::BITS RELATED
Libraries  -  XML::XMetaL 0.52
XML::XMetaL is a Perl module with dispatch class for XML::XMetaL development framework. The XML::XMetaL class is a dispatcher for XMetaL customization handlers. XML:XMetaL objects are singletons. There can be only one XML::XMetaL object...
24.58 KB  
Libraries  -  Number::Encode 1.00
Number::Encode is a Perl module to encode bit strings into digit strings. SYNOPSIS use Number::Encode qw(nonuniform uniform); Provides a mechanism to convert arbitrary bit-strings into numeric digit strings. The transformation can be uniform...
2.05 KB  
Libraries  -  Class::Meta::Declare 0.04
Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express. SYNOPSIS This was a first attempt at making a saner interface for Class::Meta. It is nicer, but Class::Meta::Express is nicer still. Go use that one. package...
15.36 KB  
Libraries  -  Exception::Class 1.23
Exception::Class is a Perl module that allows you to declare real exception classes in Perl. SYNOPSIS use Exception::Class ( MyException, AnotherException => { isa => MyException }, YetAnotherException => { isa => AnotherException,...
16.38 KB  
Libraries  -  Class::Meta::Express 0.04
Class::Meta::Express is a Perl module for concise, expressive creation of Class::Meta classes. Synopsis package My::Contact; use Class::Meta::Express; class { meta contact => ( default_type => string ); has name; has contact => (...
9.22 KB  
Libraries  -  Class::DBI::FormBuilder 0.481
Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration. SYNOPSIS package Film; use strict; use warnings; use base Class::DBI; use Class::DBI::FormBuilder; # for indented output: # use...
46.08 KB  
Libraries  -  Class::DBI::AutoIncrement 0.05
Class::DBI::AutoIncrement is a Perl module to emulate auto-incrementing columns on Class::DBI subclasses. SYNOPSIS Lets assume you have a project making use of Class::DBI. You have implemented a subclass of Class::DBI called MyProject::DBI...
8.19 KB  
Libraries  -  Class::DBI::Plugin::FilterOnClick 1.0
Class::DBI::Plugin::FilterOnClick is a Perl module to generate browsable and searchable HTML Tables using FilterOnClick in conjunction with Class::DBI. SYNOPSIS # Inside of your sub-class of Class::DBI add these lines: use...
24.58 KB  
Libraries  -  Class::Adapter::Builder 1.02
Class::Adapter::Builder is a Perl module that can generate Class::Adapter classes. SYNOPSIS package My::Adapter; use strict; use Class::Adapter::Builder ISA => Specific::API, METHODS => [ qw{foo bar baz} ], method => different_method;...
24.58 KB  
Libraries  -  Class::DBI::ConceptSearch 0.04
Class::DBI::ConceptSearch is a Perl module to retrieve Class::DBI aggregates from high-level conceptual searches. SYNOPSIS my $cs = Class::DBI::ConceptSearch->new(xml => $config); #see CONFIGURATION $cs->use_wildcards(1);...
7.17 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB