@@ -318,72 +318,72 @@ class AbstractList {
318318 */
319319 bool isEmpty () { return getSize () == 0 ; }
320320
321- /* !
322- * @brief Get an array which represent the list.
323- *
324- * @note If this list is empty, a nullptr will be returned.
325- * @note The memory for the array is dynamically allocated. the returned
326- * pointer has to be free'd with free() in order to prevent memory leaks. For
327- * further processing of the array, e.g. inserting new elements, the other
328- * method toArray(T* arr) is preferred!
329- * @note The array contains always immutable representations of the elements,
330- * saved in the list.
331- *
332- * @return Array representation of the list or nullptr if the list is
333- * empty.
334- */
335- T *toArray () {
336- if (getSize () == 0 ) {
337- return nullptr ;
338- }
339-
340- T *arr = static_cast <T *>(malloc (getSize () * sizeof (T)));
341- this ->toArray (arr);
342-
343- return arr;
344- }
345-
346- /* !
347- * @brief Fill the passed array with immutable objects.
348- *
349- * @note The array contains always immutable representations of the elements,
350- * saved in the list.
351- * @note Be sure, that the array has enough free space for all elements of the
352- * list.
353- *
354- * @param arr Array to fill.
355- */
356- void toArray (T *arr) {
357- for (int i = 0 ; i < getSize (); i++) {
358- arr[i] = get (i);
359- }
360- }
361-
362- /* !
363- * @brief Create the list from given array.
364- * @note Removes all entries in current list.
365- *
366- * @param arr Array
367- * @param arrSize Size of Array
368- */
369- void fromArray (T *arr, size_t arrSize) {
370- this ->clear ();
371- addAll (arr, arrSize);
372- }
373-
374- /* !
375- * @brief Sort the entries in the list with Quicksort.
376- *
377- * @param compFunc Comparator Method
378- */
379- void sort (int (*compFunc)(const void *, const void *)) {
380- T *arr = this ->toArray ();
381-
382- qsort (arr, getSize (), sizeof (*arr), compFunc);
383-
384- this ->fromArray (arr, getSize ());
385- free (arr);
386- }
321+ // /*!
322+ // * @brief Get an array which represent the list.
323+ // *
324+ // * @note If this list is empty, a nullptr will be returned.
325+ // * @note The memory for the array is dynamically allocated. the returned
326+ // * pointer has to be free'd with free() in order to prevent memory leaks. For
327+ // * further processing of the array, e.g. inserting new elements, the other
328+ // * method toArray(T* arr) is preferred!
329+ // * @note The array contains always immutable representations of the elements,
330+ // * saved in the list.
331+ // *
332+ // * @return Array representation of the list or nullptr if the list is
333+ // * empty.
334+ // */
335+ // T *toArray() {
336+ // if (getSize() == 0) {
337+ // return nullptr;
338+ // }
339+ //
340+ // T *arr = static_cast<T *>(malloc(getSize() * sizeof(T)));
341+ // this->toArray(arr);
342+ //
343+ // return arr;
344+ // }
345+ //
346+ // /*!
347+ // * @brief Fill the passed array with immutable objects.
348+ // *
349+ // * @note The array contains always immutable representations of the elements,
350+ // * saved in the list.
351+ // * @note Be sure, that the array has enough free space for all elements of the
352+ // * list.
353+ // *
354+ // * @param arr Array to fill.
355+ // */
356+ // void toArray(T *arr) {
357+ // for (int i = 0; i < getSize(); i++) {
358+ // arr[i] = get(i);
359+ // }
360+ // }
361+ //
362+ // /*!
363+ // * @brief Create the list from given array.
364+ // * @note Removes all entries in current list.
365+ // *
366+ // * @param arr Array
367+ // * @param arrSize Size of Array
368+ // */
369+ // void fromArray(T *arr, size_t arrSize) {
370+ // this->clear();
371+ // addAll(arr, arrSize);
372+ // }
373+
374+ // /*!
375+ // * @brief Sort the entries in the list with Quicksort.
376+ // *
377+ // * @param compFunc Comparator Method
378+ // */
379+ // void sort(int (*compFunc)(const void *, const void *)) {
380+ // T *arr = this->toArray();
381+ //
382+ // qsort(arr, getSize(), sizeof(*arr), compFunc);
383+ //
384+ // this->fromArray(arr, getSize());
385+ // free(arr);
386+ // }
387387
388388 /* !
389389 * @brief Compare two lists whether their attributes and entries are equal.
0 commit comments