BMetaDataNode Class Reference
[Data Model]

#include <storage/MetaDataNode.h>

Inheritance diagram for BMetaDataNode:

BGenericNode BnNode INode BBinder IInterface IBinder SAtom SAtom BGenericCatalog BIndexedCatalog BIndexedDataNode BIndexedTableNode BSchemaRowIDJoin BSchemaRowIDJoin::RowNode BSchemaTableNode BMetaDataCatalog BIndexedTableNode::RowNode BSchemaDatabaseNode BSchemaTableNode::RowNode BStructuredNode BCatalog BPackageManager List of all members.

Detailed Description

A base class of INode that provides all standard meta-data.

This class derives from BGenericNode, adding to it an implementation of the basic meta-data (mimeType, creationDate, modifiedDate). Derived classes need only implement LookupEntry() to have a fully functioning INode.

Todo:
Should an option be added here to allow the node to store any arbitrary meta-data? Or should that functionality be provided in some further derived class (such as BCatalog)? I guess this depends on whether we want to allow others to rely on extendable meta-data functionality...


Bookkeeping

Creation, destruction, locking, etc.

 BMetaDataNode (const SContext &context)
 BMetaDataNode ()
void TouchLocked ()
 Update the modified date.
virtual ~BMetaDataNode ()

BGenericNode Metadata API

Implement the BGenericNode virtuals needed to support the basic meta-data of a node.

virtual nsecs_t CreationDateLocked () const
 You must implement this to return the creation date.
virtual SString MimeTypeLocked () const
 Default implementation always returns "application/vnd.palm.catalog".
virtual nsecs_t ModifiedDateLocked () const
 You must implement this to return the last modification date.
virtual status_t StoreCreationDateLocked (nsecs_t value)
 Default implementation does nothing, returning B_UNSUPPORTED.
virtual status_t StoreMimeTypeLocked (const SString &value)
 Default implementation does nothing, returning B_UNSUPPORTED.
virtual status_t StoreModifiedDateLocked (nsecs_t value)
 Default implementation does nothing, returning B_UNSUPPORTED.


Constructor & Destructor Documentation

BMetaDataNode  ) 
 

BMetaDataNode const SContext context  ) 
 

~BMetaDataNode  )  [protected, virtual]
 


Member Function Documentation

nsecs_t CreationDateLocked  )  const [virtual]
 

You must implement this to return the creation date.

Implements BGenericNode.

SString MimeTypeLocked  )  const [virtual]
 

Default implementation always returns "application/vnd.palm.catalog".

Reimplemented from BGenericNode.

Reimplemented in BSchemaRowIDJoin::RowNode, BSchemaTableNode::RowNode, and BIndexedTableNode::RowNode.

nsecs_t ModifiedDateLocked  )  const [virtual]
 

You must implement this to return the last modification date.

Implements BGenericNode.

status_t StoreCreationDateLocked nsecs_t  value  )  [virtual]
 

Default implementation does nothing, returning B_UNSUPPORTED.

Reimplemented from BGenericNode.

status_t StoreMimeTypeLocked const SString value  )  [virtual]
 

Default implementation does nothing, returning B_UNSUPPORTED.

Reimplemented from BGenericNode.

Reimplemented in BSchemaRowIDJoin::RowNode, BSchemaTableNode::RowNode, and BIndexedTableNode::RowNode.

status_t StoreModifiedDateLocked nsecs_t  value  )  [virtual]
 

Default implementation does nothing, returning B_UNSUPPORTED.

Reimplemented from BGenericNode.

void TouchLocked  ) 
 

Update the modified date.


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