Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Waldo_Embed_V2 elevator_with_queue RaheeNew DS1820 ... more
Diff: LinkedList.h
- Revision:
- 1:a032c0392ba1
- Parent:
- 0:3f64a15357ac
- Child:
- 2:704e1c9057c1
--- a/LinkedList.h Thu Apr 04 20:34:38 2013 +0000
+++ b/LinkedList.h Fri Apr 05 23:14:49 2013 +0000
@@ -26,7 +26,7 @@
#include <stdint.h>
/**
- * @enum node
+ * @struct node
* @brief The Linked List structure
*/
struct node
@@ -36,12 +36,31 @@
};
/** Example using the LinkedList Class
- *
- * Example:
* @code
* int main(void)
- * {
- * }
+ * #include "mbed.h"
+ * #include "LinkedList.h"
+ *
+ * LinkedList<node>list;
+ *
+ * int main()
+ * {
+ * node *tmp;
+ *
+ * list.push((char *)"Two\n");
+ * list.append((char *)"Three\n");
+ * list.append((char *)"Four\n");
+ * list.push((char*)"One\n");
+ * list.append((char*)"Five\n");
+ *
+ * for(int i=0; i<list.length(); i++)
+ * {
+ * tmp = list.pop(i);
+ * printf("%s", (char *)tmp->data);
+ * }
+ *
+ * error("done\n");
+ * }
* @endcode
*/
@@ -71,12 +90,12 @@
*/
retT *push(void *data);
- /** Add a member to some position in the list
- * @param data - Some data type that is added to the list
- * @param loc - Place in the list to put the data
- * @return The member that was just inserted (NULL if empty)
- */
- retT *insert(void *data, uint32_t loc);
+// /** Add a member to some position in the list
+// * @param data - Some data type that is added to the list
+// * @param loc - Place in the list to put the data
+// * @return The member that was just inserted (NULL if empty)
+// */
+// retT *insert(void *data, uint32_t loc);
/** Add a member to the end of the list
* @param data - Some data type that is added to the list