C++ utility classes that I have made during other projects and think would be useful for other applications
Some of the classes are built for the "Simple and Fast Multimedia Library" (SFML) and the "Texus' Graphical User Interface" (TGUI)
This library is also used in my Networking library and Game Framework
- Compiler: g++
- Version: g++.exe (Rev2, Built by MSYS2 project) 14.2.0
- To use the prebuilt libs you have to use the ucrt MSYS2 mingw build for g++ 14.2.0
- Version: 3.0.0
- Version: 1.7
File | Brief Description | Dependencies |
---|---|---|
funcHelper.hpp |
Makes taking, storing, and using functions as variables easier. Functions set can have dynamic data given to them when the function is invoked. | None |
EventHelper.hpp |
Event class with thread-safety. Functions set to an event can have dynamic data given when the event is invoked. | None |
StringHelper.hpp |
Simple class for common string operations like trimming and converting char to lowercase. Includes functions for converting a string to float, int, etc. | None |
UpdateLimiter.hpp |
Used to limit the speed of a thread | None |
Stopwatch.hpp |
Used to check how long operations take | None |
Log.hpp |
Simple class that prints logs into a file | None |
iniParser.hpp |
Easy to use ini parser | StringHelper.hpp |
CommandHandler.hpp |
Used to create and use commands. The command handler also has the ability to search commands. | funcHelper.hpp, StringHelper.hpp |
CommandPrompt.hpp |
Simple command prompt that uses the command handler as its backend | CommandHandler.hpp, StringHelper.hpp, TGUICommon.hpp, TGUI |
TerminatingFunction.hpp |
Functions that will be called every frame until it says it is done running | funcHelper.hpp |
TFuncDisplay.hpp |
Simple display for terminating functions for debugging | TerminatingFunction.hpp, TGUICommon.hpp, TGUI, CommandHandler.hpp (optional) |
LiveVar.hpp |
Live variables are used for debugging and testing | EventHelper.hpp, funcHelper.hpp, SFML Events, CommandHandler.hpp (optional) |
VarDisplay.hpp |
Simple display for live vars, which shows all the current live vars and their values | LiveVar.hpp, TGUICommon.hpp, TGUI, CommandHandler.hpp (optional) |
GraphData.hpp |
Used to store data used for Graph.hpp | SFML Color and Vector2, StringHelper.hpp |
Graph.hpp |
A simple graph drawing class. Can draw any of the following Histogram, Bar, Scatter, and Line graphs. Can draw to a SFML texture or straight to the window | GraphData.hpp, StringHelper.hpp, Spline.hpp (from here) |
TGUICommon.hpp |
Simple classes with features that I find myself using often | TGUI, CommandHandler.hpp (optional) |
TestHelper.hpp |
Helper for testing a function or a sequence of functions runtime | SFML Window, SFML Graphics, TGUI, iniParser.hpp, Stopwatch.hpp, funcHelper.hpp, Graph.hpp |
Note that the theme can be set to any TGUI theme, and the utilities UI will update accordingly.
Firstly, to open and close the command prompt, you can use the tilde key (~)
To get a list of commands, use the command help
To find out more about a specific command, type help 'command'
Live vars can have key binds set to them for specific values or to increment them.
Example:
Example usage with command prompt:
VarDisplayAndCommandPrompt.mp4
Display for seeing the name and total time of each terminating function
Simple Graphing class that supports line graphs, bar graphs, scatter plots and histograms.
Helper for testing a function or a sequence of functions runtime