NAME

cs::Palm::PDB::Record - a Palm Pilot database record


SYNOPSIS

use cs::Palm::PDB::Record;


DESCRIPTION

The cs::Palm::PDB::Record module represents a record from a Palm Pilot file. Application specific subclasses


GENERAL FUNCTIONS

unpackAttrib(attrib)

Return an array containing a cs::Flags object (containing a subset of SECRET, BUSY, DIRTY and DEL_ON_SYNC) and the category number.

attribPack(flags, category)

Return the byte value representing the flags and category number as obtained from attribUnpack.

sub attribPack($$) { my($F,$cat)=@_;

  my $n = 0;
  for my $A ( [ 0x10,   SECRET ],
              [ 0x20,   BUSY ],
              [ 0x40,   DIRTY ],
              [ 0x80,   DEL_ON_SYNC ]
            )
  { $n|=$A->[0] if $F->Test($A->[1]);
  }
  $n|($cat & 0x0f);
}


OBJECT CREATION

New objects are created only from the cs::Palm::PDB module, and obtained by others via the Record() method of that class. The cs::Palm::App::* modules typically rebless records obtained through that method into their own record subclasses.

new cs::Palm::PDB::Record parent, nr, new

This creates a new record object given the supplied cs::Palm::PDB object parent and record number nr (which counts from 0). If set to true, the optional parameter new creates a new record.


OBJECT METHODS

Attribs()

Return the record attributes as a cs::Flags object.

Category(category)

Return the record category number. If the optional parameter category is supplied, set the category number.


SEE ALSO

cs::Palm::PDB(3), cs::Flags(3)


AUTHOR

Cameron Simpson <cs@zip.com.au>