The enclosure interface is an interface for non-leaf nodes with exactly one child. It has some child-manipulating public methods.
Every object implementing the enclosure interface must also implement the object interface, the node interface and the container interface.
Child manipulating methods
Here we give the public methods with self-decriptive names for child manipulation.
By using the _set_child
method for an enclosure which already has a
child, the old child is released (so it becomes a parent-free node) but not
destroyed. It is not allowed to use NULL
argument as
child
. Although newly created enclosures are usually childless,
after the insertion of a child there is no way for the enclosure
to become childless again.
void * vcl_enclosure_get_child (void * obj) void * vcl_enclosure_set_child (void * obj, void * child)