cuex_intf_compound Struct Reference
[cuex/compound.h: Compound Expressions]

#include <compound.h>

Data Fields

unsigned int flags
cu_ptr_source_t(* ncomm_iter_source )(cuex_intf_compound_t, cuex_t C)
cu_ptr_junctor_t(* ncomm_image_junctor )(cuex_intf_compound_t, cuex_t C)
cu_ptr_sinktor_t(* ncomm_build_sinktor )(cuex_intf_compound_t, cuex_t C)
cu_ptr_source_t(* comm_iter_source )(cuex_intf_compound_t, cuex_t C)
cu_ptr_junctor_t(* comm_image_junctor )(cuex_intf_compound_t, cuex_t C)
cu_ptr_sinktor_t(* comm_build_sinktor )(cuex_intf_compound_t, cuex_t C)
cu_ptr_sinktor_t(* comm_union_sinktor )(cuex_intf_compound_t, cuex_t C)
size_t(* size )(cuex_intf_compound_t, cuex_t C)

Detailed Description

Interface for compound expressions. This struct is meant to be declared with static storage and initialised using C99 struct member designators and must have static storage so that any future added fields become NULL. An alternative to using member designators is to provide an initialisation function. In any case, cuex_intf_compound_finish must be called on the interface at some point before the first time it is returned by an interface dispatcher, so that the implied fields can be computed. Some valid assignments for the most important members are,

assignedsynthesisedcomment
ncomm_iter_source, ncomm_image_junctor comm_iter_source, comm_image_junctor A non-commutative compound with an implied commutative view.
comm_iter_source, comm_image_junctor A purely commutative compound with limited construction.
comm_iter_source, comm_build_sinktor comm_image_junctor (or explicit) A purely commutative compound with full construction.
ncomm_iter_source, ncomm_image_junctor
comm_iter_source, comm_image_junctor
A compound with explicit non-commutative and commutative views.
ncomm_iter_source, ncomm_image_junctor
comm_iter_source, comm_build_sinktor
comm_image_junctor (or explicit) A compound with explicit non-commutative and commutative views, where the commutative view has full construction.

The comm_union_sinktor may optionally be assigned whenever comm_build_sinktor is defined.


Field Documentation

Shall return a sinktor which allows the construction of a container from scratch, using C as a template for any additional properties.

Shall return a junctor which allows the construction of an image of C. The element order must be the same as that of comm_iter_source. This can be synthesised from comm_iter_source and comm_build_sinktor. Otherwise, if comm_iter_source is synthetic, then it can also be synthesised from ncomm_image_junctor. Otherwise, no construction is allowed on this compound.

Source sequence of elements for the commutative view. If not assigned, it will be synthesised from ncomm_iter_source.

Shall return a sinktor which allows the construction of a copy of C with additional elements put into the sink.

Shall return a sinktor to construct a container from scratch using the non-commutative view.

Shall return a junctor which allows the construction of an image of C. The elements must have the same order as that returned by ncomm_iter_source. This may be left unassigned, in which case it will be synthesised if ncomm_build_sinktor is defined. If assigned, then ncomm_iter_source must also be assigned.

Source sequence of elements for the non-commutative view. This can be left unassigned for purely commutative compounds. It will not be synthesised.

Shall return the number of elements. This must correspond to the number of elements provided by ncomm_iter_source and comm_iter_source. If not defined, it will be synthesised from comm_iter_source or ncomm_iter_source.


The documentation for this struct was generated from the following file:
Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.