"Because all you have is a hammer."
I regularly found myself thinking
"Would be useful if I had these little pieces of code in this project..."
So I decided to put them all in a library I could easily include in my projects, and that would be small enough not to bloat it too much.
I still don't really know if anyone else would find it useful though, and I think that is what the name reflects : nails are essential to building anything, really, but some people just prefer to use screws, if that makes any sense.
Nail is a utility library. It aims at providing all these little things you wish you had during development and that does not need to be that complicated, but can always be extended when necessary.
Nail currently features the following:
- A Logging system
- Debugging Utilities
- An extensive implementation of Assertions inspired by this article
- An implementation of Tee, when you don't want to put std::cout everywhere while debugging, inspired by this article
- A TODO_BEFORE macro, when you want to fix yourself a deadline, inspired by this other article
- A FILENAME macro, without the full path, and SourceLocation type (soon to be replace by c++20's std::source_location)
- A crash() method, for difficult times.
- A Customisable Event System
- An EventQueue, when a time will come to process()
- An EventDispatcher, because you can handle it better
- A Signal/Listener system, when it really can't wait
- Strong Types for strong interfaces
- Additionaly, Ranged Numerical values, when you only accept values in a specific range
- Shared Library management
- Random Number Generator Utility
- System Info Utilities (Memory, OS, Architecture...)
- A Console interface
- Custom Memory Management
- Time/Date/Chrono Utilities
- Math Utilities
- Improvements to the Random Number Generator Utility
- Statistics Library
- Probably more uninteresting stuff...
I'll be working on this, otherwise it's just cmake
Developer: Gaétan "Gad" Jalin (hello)
Licence: zlib (See LICENCE file)