|
matf-rg-engine
1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Defines utility functions, macros, algorithms, and data structures. More...
#include <format>#include <source_location>#include <vector>#include <mutex>#include <filesystem>#include <functional>#include <unordered_set>#include <type_traits>

Go to the source code of this file.
Namespaces | |
| engine | |
| engine::util | |
| engine::util::alg | |
| Contains algorithm. | |
| engine::util::ds | |
Macros | |
| #define | defer auto CONCAT(defer_stmt_, __LINE__) = MakeDeferImpl() << [&] |
| Creates a defer statement. More... | |
| #define | range(container) std::begin(container), std::end(container) |
| Shorthand for std::begin(container), std::end(container). More... | |
| #define | crange(container) std::cbegin(container), std::cend(container) |
| Shorthand for std::cbegin(container), std::cend(container). More... | |
Functions | |
| void | engine::util::tracing_on () |
| Turns on tracing. More... | |
| void | engine::util::tracing_off () |
| Turns off tracing. More... | |
| void | engine::util::trace (std::source_location location=std::source_location::current()) |
| Traces a function call. More... | |
| std::string | engine::util::read_text_file (const std::filesystem::path &path) |
| Reads a text file. More... | |
| template<typename Action > | |
| void | engine::util::once (Action action) |
| Calls an action once. More... | |
| template<typename Container , typename T > | |
| bool | engine::util::alg::contains (const Container &container, const T &value) |
| Checks if a container contains a value. Shorthand for std::find. More... | |
| template<typename It , typename Adjacent > | |
| void | engine::util::alg::topological_sort (It first, It last, Adjacent adjacent) |
| Topologically sorts a directed acyclic graph represented by a range and an adjacent function. Make sure that the graph is acyclic before calling this function. Use has_cycle to check for cycles. More... | |
| template<typename It , typename Adjacent , typename OutputIt = std::nullptr_t> | |
| bool | engine::util::alg::has_cycle (It first, It last, Adjacent adjacent, OutputIt cycle_output=nullptr) |
| Checks if a graph represented by a range and an adjacent function has a cycle. More... | |
Defines utility functions, macros, algorithms, and data structures.
| #define defer auto CONCAT(defer_stmt_, __LINE__) = MakeDeferImpl() << [&] |
| #define range | ( | container | ) | std::begin(container), std::end(container) |
Shorthand for std::begin(container), std::end(container).
| #define crange | ( | container | ) | std::cbegin(container), std::cend(container) |
Shorthand for std::cbegin(container), std::cend(container).