SDatumLord::Datum Class Reference

#include <support/DatumLord.h>

Inheritance diagram for SDatumLord::Datum:

BGenericDatum BnDatum IDatum BBinder IInterface IBinder SAtom SAtom List of all members.

Public Member Functions

 Datum (const sptr< SDatumLord > &owner, const SValue &key)
virtual void InitAtom ()
 Called the first time a strong reference is acquired. All significant object initialization should go here.
virtual sptr< IBinderOpen (uint32_t mode, const sptr< IBinder > &editor, uint32_t newType)
 Access data as stream/storage.
virtual void SetSize (off_t size)
 Number of bytes in datum.
virtual void SetValue (const SValue &value)
 Access datum as an SValue.
virtual void SetValueType (uint32_t type)
 Current type code of this datum. Default is B_RAW_TYPE.
virtual off_t Size () const
 Number of bytes in datum.
void StorageDone ()
virtual SValue Value () const
 Access datum as an SValue.
virtual uint32_t ValueType () const
 Current type code of this datum. Default is B_RAW_TYPE.
virtual ~Datum ()

Constructor & Destructor Documentation

Datum const sptr< SDatumLord > &  owner,
const SValue key
 

~Datum  )  [virtual]
 


Member Function Documentation

void InitAtom  )  [virtual]
 

Called the first time a strong reference is acquired. All significant object initialization should go here.

You can override it and do any setup you need. Note that you do not need to call the SAtom implementation. (So you can derive from two different SAtom implementations and safely call down to both of their IncStrong() methods.)

See also:
IncStrong()

Reimplemented from SAtom.

sptr< IBinder > Open uint32_t  mode,
const sptr< IBinder > &  editor,
uint32_t  newType
[virtual]
 

Access data as stream/storage.

Parameters:
[in] mode The desired open mode: READ_ONLY, WRITE_ONLY, READ_WRITE, ERASE_DATUM, OPEN_AT_END.
[in] editor An optional IBinder object providing the identity of modifications made through this Open() call. Will be propagated through DatumChanged so that you can identify changes due to your own modifications.
[in] newType Optional new type code for the datum. If 0 (the default), the current type will remain unchanged.
Returns:
A new object through which you can manipulate the data inside of the IDatum. Use interface_cast<T> to retrieve the IByteInput, IByteOutput, IByteSeekable, and IStorage interfaces as desired. Returns NULL if there was an error.
Todo:
Add status_t output to retrieve error codes.

Implements IDatum.

void SetSize off_t  size  )  [virtual]
 

Number of bytes in datum.

Implements IDatum.

void SetValue const SValue value  )  [virtual]
 

Access datum as an SValue.

You can link to this for notifications when the datum changes. If the datum can not be represented as a value, the value here is "undefined" OR an error value, and it is not pushed when the datum changes. To ensure you always get notified when it changes, you should use the DatumChanged event.

Implements IDatum.

void SetValueType uint32_t  type  )  [virtual]
 

Current type code of this datum. Default is B_RAW_TYPE.

Implements IDatum.

off_t Size  )  const [virtual]
 

Number of bytes in datum.

Implements IDatum.

void StorageDone  ) 
 

SValue Value  )  const [virtual]
 

Access datum as an SValue.

You can link to this for notifications when the datum changes. If the datum can not be represented as a value, the value here is "undefined" OR an error value, and it is not pushed when the datum changes. To ensure you always get notified when it changes, you should use the DatumChanged event.

Implements IDatum.

uint32_t ValueType  )  const [virtual]
 

Current type code of this datum. Default is B_RAW_TYPE.

Implements IDatum.


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