KDE PIM / Developers / API Docs / kpilot / lib

PilotRecord Class Reference

An "uninterpreted" representation of the bits comprising a HH record. More...

#include <pilotRecord.h>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

An "uninterpreted" representation of the bits comprising a HH record.

This class maintains a created and deleted count which can be requested using allocationInfo().


Member Enumeration Documentation

anonymous enum
 

A constant, really left over from PalmOS 4 days, when records could be 64k in size at most.

It is used in various places to dimension buffers, but should be considered deprecated.


Constructor & Destructor Documentation

PilotRecord::PilotRecord void *  data,
int  length,
int  attrib,
int  cat,
recordid_t  uid
 

Constructor.

Using the given data and length, create a record. Give it the additional attributes and category numbers; the UID is a HH unique ID for identifying records.

This constructor makes a copy of the data buffer (and owns that buffer).

PilotRecord::PilotRecord pi_buffer_t *  buf,
int  attrib,
int  cat,
recordid_t  uid
[inline]
 

Constructor.

Using the given buffer buf (which carries its own data and length), create a record. Otherwise much like the above constructor except that this record assumes ownership of the buffer, and doesn't make an additional copy (In practice, this just saves copying around extra buffers).

PilotRecord::~PilotRecord  )  [inline]
 

Destructor.

Dispose of the buffers in the right form.

PilotRecord::PilotRecord PilotRecord orig  ) 
 

Constructor.

Copies the data from the orig record.


Member Function Documentation

char* PilotRecord::getData  )  const [inline]
 

Retrieve the data buffer for this record.

Note that trying to change this data is fraught with peril -- especially trying to lengthen it.

See also:
setData

int PilotRecord::getLen  )  const [inline]
 

Returns the length of the data for this record.

const pi_buffer_t* PilotRecord::buffer  )  const [inline]
 

Returns the data buffer associated with this record.

void PilotRecord::setData pi_buffer_t *  b  )  [inline]
 

Set the data for this record.

Frees old data. Assumes ownership of the passed in buffer b.

PilotRecord & PilotRecord::operator= PilotRecord orig  ) 
 

Assignment operator.

Makes a copy of the orig record.

void PilotRecord::setData const char *  data,
int  len
 

Sets the data for this record.

Makes a copy of the data buffer.

void PilotRecord::allocationInfo  )  [static]
 

This is an interface for tracking down memory leaks in the use of PilotRecords (for those without valgrind).

Count the number of allocations and deallocations.


The documentation for this class was generated from the following files: