Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uranusjr/qtcollections
More container classes for Qt, inspired by Python's collections module.
https://github.com/uranusjr/qtcollections
Last synced: about 1 month ago
JSON representation
More container classes for Qt, inspired by Python's collections module.
- Host: GitHub
- URL: https://github.com/uranusjr/qtcollections
- Owner: uranusjr
- License: mit
- Created: 2016-02-24T08:51:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-07-25T06:50:55.000Z (over 4 years ago)
- Last Synced: 2024-10-14T19:42:00.284Z (3 months ago)
- Language: C++
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QtCollections
More container classes for Qt, inspired by Python's [collections] module. Currently only `OrderedDict` is implemented (`qtcollections::OrderedHash`).
## License
QtColelctions is released under the terms of MIT License. You may find the content of the license [here](http://opensource.org/licenses/MIT), or in the `LICENSE` file.
## Implementation Details
### `OrderedHash`
The ordered hash is implemented with a `QHash` for its underlying storage, and a `QLinkedList` to keep track of key ordering. An extra `QHash` is used for reverse lookup, so that removal of any item can be guarenteed `O(1)`.
Compared with [qt-ordered-map], a project providing the same container, this implementation is more memory-heavy, but should be better in performance, especially for const operations. The API is also more in-line with standard Qt containers, especially in Qt 5.
[collections]: https://docs.python.org/3/library/collections.html
[qt-ordered-map]: https://github.com/mandeepsandhu/qt-ordered-map