From 9780901ac4f8d7c19c72b90f52364f34b1203384 Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Thu, 21 May 2020 21:45:29 +0200 Subject: [PATCH] Put some documentation --- .gitignore | 1 + README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1111191..80d734b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ bin/tests.profdata bin/tests.profraw bin/test_n render.bmp +README.html diff --git a/README.md b/README.md index dcf516f..d4f67b5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,69 @@ # gplib -General Purpose library for POSIX systems \ No newline at end of file +General Purpose library for Freestanding C++ environment and POSIX systems. + +> Expects C++17 + +## Datastructures + +### `buffer` + +Also named "slices" in other languages, they are a combination of a pointer and a size. + +### `array` + +A fixed size, inplace array. + +### `indexed_array` + +A resizable, fragmentation resistant array, it associates elements with fixed indices. It will reuse deleted indices. + +### `optional` + +A Maybe monad, will not allocate for final classes or primitives. + +### `variant` and `fixed_variant` + +### `ring_list` + +### `bloomfilter` + +### `quotient_filter` + +## Algorithms + +## Tools + +### Allocators + +### Renderer + +### Internal file-system + +## GP Configuration + +### `enum class gp_errorcodes` + +This `enum` should not contain any non-zero value. + +- `infinite_skipstone`: used when a linear probing reaches infinity lookup + +### Generic elements + +- `constexpr bool gp_config::has_exceptions`: enables or disables exceptions throwing +- `constexpr bool gp_config::has_buffer_bounds`: enables or disables bound checking +- `constexpr size_t gp_config::arc4random_strength`: determines the amount of shuffling of the arc4random PRNG +- `constexpr /* T */ gp_config::assertion`: `T` is a callable type taking a boolean predicate and a `const char*` +- `typedef /* T */ file_descriptor_t`: `T` is an integer type. No negative value should be expected + + +### Rendering and mathematics + +- `using gp_config::rendering::default_type`: provide a numeric type for rendering and for the mathematical framework +- `constexpr default_type gp_config::rendering::epsilon`: a small value of the default type (example for float: `0.001f`) +- `#define GP_CONFIG__RENDERING__COLOR_T`: a configuration define for storing a color for rendering purposes + +### Memory + +- `using gp_config::memory_module::default_allocator`: a default constructible allocator type +- `constexpr bool gp_config::memory_module::is_ok`: true if the default allocator is able to allocate, false if not \ No newline at end of file