4 #ifndef RUDIMENTS_LINKEDLIST_H
5 #define RUDIMENTS_LINKEDLIST_H
7 #include <rudiments/private/linkedlistincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
14 template <
class datatype>
26 void setData(datatype data);
29 datatype getData()
const;
34 int32_t compare(datatype data)
const;
51 #include <rudiments/private/linkedlistnode.h>
60 template <
class datatype,
class linkedlistnodetype=linkedlistnode<datatype> >
73 void append(datatype data);
77 void append(linkedlistnodetype *node);
83 bool insert(uint64_t index, datatype data);
89 bool insert(uint64_t index, linkedlistnodetype *node);
94 bool removeByIndex(uint64_t index);
99 bool removeByData(datatype data);
104 bool removeAllByData(datatype data);
109 bool removeNode(linkedlistnodetype *node);
115 bool setDataByIndex(uint64_t index, datatype data);
121 bool getDataByIndex(uint64_t index, datatype *data);
124 uint64_t getLength()
const;
127 linkedlistnodetype *getFirstNode();
130 linkedlistnodetype *getLastNode();
133 linkedlistnodetype *getNodeByIndex(uint64_t index);
137 linkedlistnodetype *getNodeByData(datatype data);
141 linkedlistnodetype *getNodeByData(
142 linkedlistnodetype *startnode,
153 #include <rudiments/private/linkedlist.h>
159 #ifdef RUDIMENTS_NAMESPACE
163 #include <rudiments/private/linkedlistnodeinlines.h>
164 #include <rudiments/private/linkedlistinlines.h>