added two methods to clone linked lists and the contained objects.

This commit is contained in:
Tobias Brunner
2007-07-31 12:54:17 +00:00
parent 725e263ff3
commit ebd9ef27c3
2 changed files with 57 additions and 0 deletions
+19
View File
@@ -6,6 +6,7 @@
*/
/*
* Copyright (C) 2007 Tobias Brunner
* Copyright (C) 2005-2006 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
@@ -185,6 +186,24 @@ struct linked_list_t {
*/
void (*invoke) (linked_list_t *this, size_t offset);
/**
* @brief Clones a list and its objects using the objects' clone method.
*
* @param this calling object
* @param offset offset ot the objects clone function
* @return cloned list
*/
linked_list_t *(*clone_offset) (linked_list_t *this, size_t offset);
/**
* @brief Clones a list and its objects using a given function.
*
* @param this calling object
* @param function function that clones an object
* @return cloned list
*/
linked_list_t *(*clone_function) (linked_list_t *this, void*(*)(void*));
/**
* @brief Destroys a linked_list object.
*