AdgPrimitive

AdgPrimitive — A wrapper for CpmlPrimitive

Synopsis

typedef             AdgPrimitive;
AdgPrimitive *      adg_primitive_deep_dup              (const AdgPrimitive *primitive);
AdgPrimitive *      adg_primitive_dup                   (const AdgPrimitive *primitive);

Object Hierarchy

  GBoxed
   +----AdgPrimitive

Description

AdgPrimitive is a wrapper in GType syntax of the CpmlPrimitive struct.

Details

AdgPrimitive

typedef CpmlPrimitive AdgPrimitive;

Another name for CpmlPrimitive: check its documentation for the fields description and visibility details.

Since 1.0


adg_primitive_deep_dup ()

AdgPrimitive *      adg_primitive_deep_dup              (const AdgPrimitive *primitive);

Duplicates primitive. This function makes a deep duplication of primitive, that is it duplicates also the definition data (both org and data).

Furthermore, the new segment field will point to a fake duplicated segment with only its first primitive set (the first primitive of a segment should be a CPML_MOVE). This is needed in order to let a CPML_CLOSE work as expected.

All the data is allocated in the same chunk of memory so freeing the returned pointer releases all the occupied memory.

primitive :

an AdgPrimitive structure

Returns :

a deep duplicate of primitive: must be freed with g_free() when no longer needed. [transfer full]

Since 1.0


adg_primitive_dup ()

AdgPrimitive *      adg_primitive_dup                   (const AdgPrimitive *primitive);

Duplicates primitive. This function makes a shallow duplication of primitives, that is the internal pointers of the resulting primitive struct refer to the same memory as the original primitive. Check out adg_primitive_deep_dup() if it is required also the content duplication.

primitive :

an AdgPrimitive structure

Returns :

a shallow duplicate of primitive: must be freed with g_free() when no longer needed. [transfer full]

Since 1.0