Back to index

lightning-sunbird  0.9+nobinonly
Defines
calAttributeHelpers.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CAL_ATTR_SET_PRE
#define CAL_ATTR_SET_POST
#define CAL_STRINGTYPE_ATTR_GETTER(cname, mtype, name)
 A few helpers for declaring simple attribute getters and setters in calItemBase derivatives.
#define CAL_STRINGTYPE_ATTR_SETTER(cname, mtype, name)
#define CAL_STRINGTYPE_ATTR(cname, mtype, name)
#define CAL_VALUETYPE_ATTR_GETTER(cname, mtype, name)
#define CAL_VALUETYPE_ATTR_SETTER(cname, mtype, name)
#define CAL_VALUETYPE_ATTR(cname, mtype, name)
#define CAL_ISUPPORTS_ATTR_GETTER(cname, mtype, name)
#define CAL_ISUPPORTS_ATTR_SETTER(cname, mtype, name)
#define CAL_ISUPPORTS_ATTR(cname, mtype, name)

Define Documentation

Definition at line 47 of file calAttributeHelpers.h.

Definition at line 43 of file calAttributeHelpers.h.

#define CAL_ISUPPORTS_ATTR (   cname,
  mtype,
  name 
)
Value:
CAL_ISUPPORTS_ATTR_GETTER(cname,mtype,name) \
    CAL_ISUPPORTS_ATTR_SETTER(cname,mtype,name)

Definition at line 120 of file calAttributeHelpers.h.

#define CAL_ISUPPORTS_ATTR_GETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Get##name (mtype **_retval) { \
    NS_ENSURE_ARG_POINTER(_retval); \
    NS_IF_ADDREF (*_retval = m##name); \
    return NS_OK; \
}

Definition at line 101 of file calAttributeHelpers.h.

#define CAL_ISUPPORTS_ATTR_SETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Set##name (mtype *aValue) { \
    CAL_ATTR_SET_PRE; \
    if (m##name != aValue) { \
        m##name = aValue; \
        CAL_ATTR_SET_POST; \
    } \
    return NS_OK; \
}

Definition at line 109 of file calAttributeHelpers.h.

#define CAL_STRINGTYPE_ATTR (   cname,
  mtype,
  name 
)
Value:
CAL_STRINGTYPE_ATTR_GETTER(cname,mtype,name) \
    CAL_STRINGTYPE_ATTR_SETTER(cname,mtype,name)

Definition at line 72 of file calAttributeHelpers.h.

#define CAL_STRINGTYPE_ATTR_GETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Get##name (mtype &_retval) { \
    _retval.Assign(m##name); \
    return NS_OK; \
}

A few helpers for declaring simple attribute getters and setters in calItemBase derivatives.

Definition at line 56 of file calAttributeHelpers.h.

#define CAL_STRINGTYPE_ATTR_SETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Set##name (const mtype &aValue) { \
    CAL_ATTR_SET_PRE; \
    m##name.Assign(aValue); \
    CAL_ATTR_SET_POST; \
    return NS_OK; \
}

Definition at line 63 of file calAttributeHelpers.h.

#define CAL_VALUETYPE_ATTR (   cname,
  mtype,
  name 
)
Value:
CAL_VALUETYPE_ATTR_GETTER(cname,mtype,name) \
    CAL_VALUETYPE_ATTR_SETTER(cname,mtype,name)

Definition at line 96 of file calAttributeHelpers.h.

#define CAL_VALUETYPE_ATTR_GETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Get##name (mtype *_retval) { \
    NS_ENSURE_ARG_POINTER(_retval); \
    *_retval = m##name; \
    return NS_OK; \
}

Definition at line 77 of file calAttributeHelpers.h.

#define CAL_VALUETYPE_ATTR_SETTER (   cname,
  mtype,
  name 
)
Value:
NS_IMETHODIMP \
cname::Set##name (mtype aValue) { \
    CAL_ATTR_SET_PRE; \
    if (m##name != aValue) { \
        m##name = aValue; \
        CAL_ATTR_SET_POST; \
    } \
    return NS_OK; \
}

Definition at line 85 of file calAttributeHelpers.h.