Releases: nkaaf/Arduino-List
v3.0.1
3.0.0
Breaking Changes
- Get Function
- get -> returning immutable value (replacement for getValue)
- getMutable -> returning mutable pointer (replacement for getPointer)
New API
- void addAll(int index , T *arr, size_t arrSize) - add all entries from the array to the list at the index.
API Removal
- toArray
- fromArray
- sort
Further Changes
- add Clang-Format file for unified code style
- adding Tests based on Unity
- Prevent all mutable lists to save Rvalues
- RValues are only temporary and therefore they cannot be saved in a mutable list (!)
- Entries can save a pointer for mutable values and an object for immutable values
- setValue and getValue of the entries now depends on the mutability of the list
- T objects are now saved in the Entries instead of "pointer to T objects"
- This is because of the scoped memory allocation of an object during the add-process. Otherwise the object would be free'd after running out of the add-method scope.
- remove macro for the creation of final values due to the fact, that 'memcpy' does not work on objects of classes
- add pre-processor checks for rvalue-functions (only available in C++11 or later; and earlier by defining a macro)
- change some int to size_t where it makes logical sense
- more correct equals check for mutable lists (not only value equal, but object/reference equal)
What's Changed
- Bump actions/checkout from 3 to 4 by @dependabot in #38
- Bump actions/setup-python from 4 to 5 by @dependabot in #43
- Version 3.0.0 by @nkaaf in #42
Full Changelog: v2.1.4...v3.0.0
3.0.0 Pre 2
Warning: This is a Pre-Release. It is not intended to be used in production system because of (maybe) decreased/isolated functionality. Pre-Releases are published to be tested and reviewed by the audience.
Intention
This pre-release aims to prove the functionality of immutable DoubleLinkedLists and mutable SingleLinkedLists (aka. List) and DoubleLinkedLists. Actions involving rvalues (primitives and classes) and lvalues (classes) are important.
Documentation
Please note, that the documentation might not be on-point, and changed on the way to the 3.0.0 Release.
API Removal
- toArray
- fromArray
- sort
Tests
- This release adds Unity/PlatformIO Tests for Immutable SingleLinkedLists, Lists and DoubleLinkedLists
Internal changed
- Prevent all mutable lists to save Rvalues
- RValues are only temporary and therefore they cannot be saved in a mutable list (!)
- Entries can save a pointer for mutable values and an object for immutable values
- setValue and getValue of the entries now depends on the mutability of the list
Full Changelog: v3.0.0pre1...v3.0.0pre2
3.0.0 Pre 1
Warning: This is a Pre-Release. It is not intended to be used in production system because of (maybe) decreased/isolated functionality. Pre-Releases are published to be tested and reviewed by the audience.
Intention
This pre-release aims to prove the functionality of immutable SingleLinkedLists (aka. List). Actions involving rvalues (primitives and classes) and lvalues (classes) are important.
Non functional
- Mutable SingleLinkedLists
- (Im)Mutable DoubleLInkedLists
- toArray, fromArray, sort - methods in all lists
Documentation
Please note, that the documentation might not be on-point, and changed on the way to the 3.0.0 Release.
Breaking Changes
- Get Function
- get -> returning immutable value (replacement for getValue)
- getMutable -> returning mutable pointer (replacement for getPointer)
New API
- void addAll(int index , T *arr, size_t arrSize) - add all entries from the array to the list at the index.
Internal changed
- T objects are now saved in the Entries instead of "pointer to T objects"
- This is because of the scoped memory allocation of an object during the add-process. Otherwise the object would be free'd after running out of the add-method scope.
- remove macro for the creation of final values due to the fact, that 'memcpy' does not work on objects of classes
- add pre-processor checks for rvalue-functions (only available in C++11 or later; and earlier by defining a macro)
- change some int to size_t where it makes logical sense
- more correct equals check for mutable lists (not only value equal, but object/reference equal)
Further changes
- Comment out toArray function in example file
- clearer documentation
- add Tests for immutable SingleLinkedList with PlatformIO Unity-Engine
Full Changelog: v2.1.4...v3.0.0pre1
2.1.4
New API functions
- sort (Quicksort implementation)
- fromArray
Improvement
- Add functions can now accept rvalues
Full Changelog: v2.1.3...v2.1.4
2.1.3
2.1.2
Changes
- update copyright for files which were edited in 2022
- add library.json for PlatformIO
Full Changelog: v2.1.1...v2.1.2
2.1.1
2.1.0
Features
- New List:
DoubleLinkedList
clear()
method for removing all elements of the list (alias:removeAll()
) -> thanks to @nnyerges for the idea (#13)
Examples
- add
clear()
call
Fix
- Removing elements in SingleLinkedLists
Internal Changes
- Add private Class for Entries
- Reorder methods
- add new Class and new methods to keywords file
Full Changelog: v2.0.0...v2.1.0
2.0.0
Breaking Changes
- Change default mutability behavior to immutable list to be more intuitive (#7)
- remove get() method from public api; it should be an internal implementation
Examples
- update to new (im)mutable behavior
- prefer using the getValue() method; remove usage of get()
- prevent memory leaks
Migration
- If you want to have a mutable list, set the parameter of the constructor to 'true' (boolean)
- replace get() with getValue(), or getPointer() where needed. getValue() is the more often used method, and it doesn't need the unary indirection operator (*) which will make it more user-friendly. Experts can use getPointer() if they need the pointer.