Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Files | Data Structures | Macros | Typedefs | Functions

Files

file  afw_object_impl.h
 Helpers for object implementation development.
 

Data Structures

struct  afw_object_impl_property_meta_object_self_s
 
struct  afw_object_impl_name_handler_t
 

Macros

#define AFW_OBJECT_IMPL_ASSERT_SELF_MUTABLE
 

Typedefs

typedef struct afw_object_impl_property_meta_object_self_s afw_object_impl_property_meta_object_self_t
 
typedef const afw_value_t *(* afw_object_impl_special_get_t) (afw_object_impl_property_meta_object_self_t *self, const afw_utf8_t *property_name, afw_xctx_t *xctx)
 
typedef void(* afw_object_impl_special_set_t) (afw_object_impl_property_meta_object_self_t *self, const afw_utf8_t *property_name, const afw_value_t *value, afw_xctx_t *xctx)
 

Functions

const afw_utf8_t *const * afw_object_impl_get_parent_paths_from_parents (const afw_object_t *const *parents, afw_xctx_t *xctx)
 Get list of parent paths from list of parents. More...
 
 afw_object_impl_internal_get_meta (const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_meta for interface afw_object. More...
 
const afw_value_tafw_object_impl_get_meta (const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_meta for interface afw_object that can be accessed externally. More...
 
 afw_object_impl_internal_get_property_meta (const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_property_meta for interface afw_object. More...
 
const afw_value_tafw_object_impl_get_property_meta (const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_property_meta for interface afw_object that can be accessed externally. More...
 
 afw_object_impl_internal_get_next_property_meta (const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_next_property_meta for interface afw_object. More...
 
const afw_value_tafw_object_impl_get_next_property_meta (const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx)
 A general impl of method get_next_property_meta for interface afw_object that can be accessed externally. More...
 

Detailed Description

Macro Definition Documentation

◆ AFW_OBJECT_IMPL_ASSERT_SELF_MUTABLE

#define AFW_OBJECT_IMPL_ASSERT_SELF_MUTABLE
Value:
do { \
if (self->immutable) { \
AFW_OBJECT_ERROR_OBJECT_IMMUTABLE; \
} \
} while (0)

Definition at line 60 of file afw_object_impl.h.

Function Documentation

◆ afw_object_impl_get_meta()

const afw_value_t* afw_object_impl_get_meta ( const afw_object_t instance,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_meta for interface afw_object that can be accessed externally.

Parameters
instanceof object.
pfor result.
xctxof caller.
Returns
meta object.

Function afw_object_impl_internal_get_meta() can not be used directly in separate dlls or exes.

Use the following implementation of impl_afw_object_get_meta() to access afw_object_impl_internal_get_meta():

const afw_value_t * impl_afw_object_get_meta( const afw_object_t * instance, afw_xctx_t *xctx) { return afw_object_impl_get_meta( instance, property_name, p, xctx); }

Definition at line 50 of file afw_object_impl.c.

◆ afw_object_impl_get_next_property_meta()

const afw_value_t* afw_object_impl_get_next_property_meta ( const afw_object_t instance,
const afw_iterator_t **  iterator,
const afw_utf8_t **  property_name,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_next_property_meta for interface afw_object that can be accessed externally.

Parameters
instanceof object.
iteratorpointer (set to NULL before first call)
property_namepointer to return property name.
pfor result.
xctxof caller.
Returns
list value of object's property meta.

Function afw_object_impl_internal_get_next_property_meta() can not be used directly in separate dlls or exes.

Use the following implementation of impl_afw_object_get_next_property_meta() to access afw_object_impl_internal_get_next_property_meta():

const afw_value_t * impl_afw_object_get_next_property_meta( const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, afw_xctx_t *xctx) { return afw_object_impl_get_next_property_meta( instance, iterator, property_name, p, xctx); }

Definition at line 436 of file afw_object_impl_property_meta.c.

◆ afw_object_impl_get_parent_paths_from_parents()

const afw_utf8_t* const* afw_object_impl_get_parent_paths_from_parents ( const afw_object_t *const *  parents,
afw_xctx_t xctx 
)

Get list of parent paths from list of parents.

Parameters
parentsis NULL terminated list of parent object pointers.
xctxof caller.
Returns
NULL terminated list of parent paths.

This can be used in implementations of afw_object_get_parent_paths() when parent_paths is not set but parents is.

Definition at line 19 of file afw_object_impl.c.

◆ afw_object_impl_get_property_meta()

const afw_value_t* afw_object_impl_get_property_meta ( const afw_object_t instance,
const afw_utf8_t property_name,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_property_meta for interface afw_object that can be accessed externally.

Parameters
instanceof object.
property_nameto get meta for.
pfor result.
xctxof caller.
Returns
meta object.

Function afw_object_impl_internal_get_property_meta() can not be used directly in separate dlls or exes.

Use the following implementation of impl_afw_object_get_property_meta() to access afw_object_impl_internal_get_property_meta():

const afw_value_t * impl_afw_object_get_property_meta( const afw_object_t * instance, const afw_utf8_t * property_name, afw_xctx_t *xctx) { return afw_object_impl_get_property_meta( instance, property_name, p, xctx); }

Definition at line 419 of file afw_object_impl_property_meta.c.

◆ afw_object_impl_internal_get_meta()

afw_object_impl_internal_get_meta ( const afw_object_t instance,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_meta for interface afw_object.

Parameters
instanceof object.
pfor result.
xctxof caller.
Returns
meta object.

To use in implementation, add the following lines after the #includes in the implementation source:

#define impl_afw_object_get_property_meta \ afw_object_impl_internal_get_property_meta

Definition at line 65 of file afw_object_impl.c.

◆ afw_object_impl_internal_get_next_property_meta()

afw_object_impl_internal_get_next_property_meta ( const afw_object_t instance,
const afw_iterator_t **  iterator,
const afw_utf8_t **  property_name,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_next_property_meta for interface afw_object.

Parameters
instanceof object.
iteratorpointer (set to NULL before first call)
property_namepointer to return property name.
pfor result.
xctxof caller.
Returns
list value of object's property meta.

To use in implementation, add the following lines after the #includes in the implementation source:

#define impl_afw_object_get_next_property_meta \ afw_object_impl_internal_get_next_property_meta

Definition at line 492 of file afw_object_impl_property_meta.c.

◆ afw_object_impl_internal_get_property_meta()

afw_object_impl_internal_get_property_meta ( const afw_object_t instance,
const afw_utf8_t property_name,
const afw_pool_t p,
afw_xctx_t xctx 
)

A general impl of method get_property_meta for interface afw_object.

Parameters
instanceof object.
property_nameto get meta for.
pfor result.
xctxof caller.
Returns
meta object.

To use in implementation, add the following lines after the #includes in the implementation source:

#define impl_afw_object_get_property_meta \ afw_object_impl_internal_get_property_meta

Definition at line 453 of file afw_object_impl_property_meta.c.