Classes Files

Wombat::MamaFieldCacheField

More…

#include <MamaFieldCacheField.h>

Public Functions

  Name
  MamaFieldCacheField()
virtual ~MamaFieldCacheField()
  MamaFieldCacheField(const MamaFieldCacheField & rhs)
MamaFieldCacheField & operator=(const MamaFieldCacheField & rhs)
bool operator==(const MamaFieldCacheField & rhs) const
bool operator!=(const MamaFieldCacheField & rhs) const
virtual void create(const MamaFieldDescriptor & descriptor)
virtual void create(mama_fid_t fid, mamaFieldType type, const char * name =NULL)
virtual void clear()
virtual mama_fid_t getFid() const
virtual mamaFieldType getType() const
const char * getName() const
void setDescriptor(const MamaFieldDescriptor * descriptor)
const MamaFieldDescriptor * getDescriptor() const
virtual bool isModified() const
virtual void setPublish(bool value =true)
virtual bool getPublish() const
virtual void setCheckModified(bool value =true)
virtual bool getCheckModified() const
virtual bool isVector() const
mamaFieldCacheField & getCValue()
const mamaFieldCacheField & getCValue() const

Detailed Description

class Wombat::MamaFieldCacheField;

The [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html) class is used to store the information on the type of a field and its value(s). This class does not provide methods to set and get the value (check the specific types of fields such as MamaFieldCacheFieldBool).

Public Functions Documentation

function MamaFieldCacheField

MamaFieldCacheField()

Constructor. Use create to create the actual field.

function ~MamaFieldCacheField

virtual ~MamaFieldCacheField()

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

function MamaFieldCacheField

MamaFieldCacheField(
    const MamaFieldCacheField & rhs
)

Parameters:


Copy constructor.

function operator=

MamaFieldCacheField & operator=(
    const MamaFieldCacheField & rhs
)

Parameters:

  • rhs The source MamaFielCacheField.

Return: The MamaFieldCacheField itself.

Copy rhs into the current object.

function operator==

bool operator==(
    const MamaFieldCacheField & rhs
) const

Parameters:

  • rhs The other field to check equality.

Return: Whether the two fields are equal.

Return if the current field is equal to the specified field.

function operator!=

bool operator!=(
    const MamaFieldCacheField & rhs
) const

Parameters:

  • rhs The other field to check difference.

Return: Whether the two fields are different.

Return if the current field is different from the specified field.

function create

virtual void create(
    const MamaFieldDescriptor & descriptor
)

Parameters:

  • descriptor Descriptor of the field to create.

Create a MamaFieldCacheField.

function create

virtual void create(
    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.

Create a MamaFieldCacheField.

function clear

virtual void clear()

Clear the [MamaFieldCacheField](classWombat_1_1MamaFieldCacheField.html). The field is ready to be used, as long as create has been called once.

function getFid

virtual mama_fid_t getFid() const

Return: The field id of the field.

Return the field id. If the field is not valid, then 0 is returned.

function getType

virtual mamaFieldType getType() const

Return: The field type of the field.

Return the field type. If the field is not valid, then MAMA_FIELD_TYPE_UNKNOWN is returned.

function getName

const char * getName() const

Return:

Return the name of the field. If the name is not set, then NULL is returned.

function setDescriptor

void setDescriptor(
    const MamaFieldDescriptor * descriptor
)

Parameters:

  • descriptor Pointer to the descriptor of the field.

Set the descriptor of the field.

function getDescriptor

const MamaFieldDescriptor * getDescriptor() const

Return: Pointer to the descriptor of the field.

Return the descriptor of the field. If the descriptor is not set, NULL is returned.

function isModified

virtual bool isModified() const

Return: Whether the field is modified.

Return whether the field has been modified or not.

function setPublish

virtual void setPublish(
    bool value =true
)

Parameters:

  • value The publish flag.

Set the publish flag of the field. If set to false, the field is never published.

function getPublish

virtual bool getPublish() const

Return: The publish flag.

Return the always publish flag of the field.

function setCheckModified

virtual void setCheckModified(
    bool value =true
)

Parameters:

  • value The checkModified flag.

Set the checkModifed flag of a field. If set to true, the field will be checked for modification before publishing.

function getCheckModified

virtual bool getCheckModified() const

Return: The check modified flag.

Return the checkModified flag of the field.

function isVector

virtual bool isVector() const

Return: If the field is a vector field.

Return if the field is a vector (otherwise is a single-value field).

function getCValue

mamaFieldCacheField & getCValue()

function getCValue

const mamaFieldCacheField & getCValue() const

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