Classes Files

Wombat::MamaFieldCacheRecord

More…

#include <MamaFieldCacheRecord.h>

Public Functions

  Name
  MamaFieldCacheRecord()
virtual ~MamaFieldCacheRecord()
virtual void create()
virtual void clear()
virtual MamaFieldCacheField & add(mama_fid_t fid, mamaFieldType type, const char * name =NULL)
virtual MamaFieldCacheField & add(const MamaFieldDescriptor & descriptor)
virtual const MamaFieldCacheField & operator[](mama_size_t index) const
virtual MamaFieldCacheField & operator[](mama_size_t index)
virtual const MamaFieldCacheField & find(mama_fid_t fid, const char * name =NULL) const
virtual MamaFieldCacheField & find(mama_fid_t fid, const char * name =NULL)
virtual mama_size_t getSize() const
virtual mamaFieldCacheRecord getCValue()
virtual const mamaFieldCacheRecord getCValue() const

Detailed Description

class Wombat::MamaFieldCacheRecord;

The [MamaFieldCacheRecord](classWombat_1_1MamaFieldCacheRecord.html) class is a collection of unordered [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) elements.

Public Functions Documentation

function MamaFieldCacheRecord

MamaFieldCacheRecord()

Constructor. Use create to create the actual cache.

function ~MamaFieldCacheRecord

virtual ~MamaFieldCacheRecord()

Destructor. This is called automatically when an object is destroyed. This method will clean all the memory allocated.

function create

virtual void create()

Creates a [MamaFieldCacheRecord](classWombat_1_1MamaFieldCacheRecord.html).

function clear

virtual void clear()

Clear the [MamaFieldCacheRecord](classWombat_1_1MamaFieldCacheRecord.html). No fields will be present in the record after this operation. The record is ready to be used, as long as create has been called once.

function add

virtual MamaFieldCacheField & add(
    mama_fid_t fid,
    mamaFieldType type,
    const char * name =NULL
)

Parameters:

  • fid Field id of the field to create.
  • type Field type of the field to create.
  • name Name of the field to create.

Return: The new field created.

Add and creates a [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) to the record. The new field is then returned.

function add

virtual MamaFieldCacheField & add(
    const MamaFieldDescriptor & descriptor
)

Parameters:

  • descriptor Descriptor of the field to create.

Return: The new field created.

Add and creates a [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) to the record. The new field is then returned.

function operator[]

virtual const MamaFieldCacheField & operator[](
    mama_size_t index
) const

function operator[]

virtual MamaFieldCacheField & operator[](
    mama_size_t index
)

function find

virtual const MamaFieldCacheField & find(
    mama_fid_t fid,
    const char * name =NULL
) const

Parameters:

  • fid Field id of the field to look up.
  • name Field name of the field to look up.

Return: The field in the record.

Find a [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) in the record.

function find

virtual MamaFieldCacheField & find(
    mama_fid_t fid,
    const char * name =NULL
)

Parameters:

  • fid Field id of the field to look up.
  • name Field name of the field to look up.

Return: The field in the record.

Find a [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) in the record.

function getSize

virtual mama_size_t getSize() const

Return: Size of the record.

Return the number of fields present in the record.

function getCValue

virtual mamaFieldCacheRecord getCValue()

function getCValue

virtual const mamaFieldCacheRecord getCValue() const

Updated on 2023-03-31 at 15:29:25 +0100