Jackalope / jlib (public) (License: GPLv3 or later) (since 2019-11-18) (hash sha1)
jlib C++ template library
Used to replace std functionality without exception handling.
- data structures
- filesystem routines
- crossplatform threads interface (currently only pthreads implementation)
- thread pool
- crossplatform dynamic memory functions interface (allocate, reallocate, deallocate) with alignment support
- high percision timer routines based on timespec
List of commits:
Subject Hash Author Date (UTC)
new darray function 41ed65d9c71ba226572b451f487ac381bdcb382d Your Name 2019-11-25 03:20:26
threads wrapper and thread pool moved to jlib e902ab04f388b331f7b0201a01591c52c0fb44a5 Your Name 2019-11-25 02:11:05
sharray implementation 84f563f018049700a9aaa3d9b915cd8e60010d6a Your Name 2019-11-25 02:10:39
removed excess cmake variable 5391e7b7eb08e7aef83e7b3783c3eb405b701f99 Your Name 2019-11-25 02:09:41
max and min functions 9aee2d76ffc74c9ff5e9b10591b4b5a77de8a859 Your Name 2019-11-25 02:09:16
item_call uses call func instead of constructor, so refference or copy can be passed and added conditional removing in darray 4caca92c89f8945a937e9fe6d5c8634ffc6b0af1 Your Name 2019-11-25 02:08:08
sharray work in progress 440da36f73077f6b7eec359d0059d1b1df96b295 Your Name 2019-11-24 21:47:22
darray protected members renamed b4ade511fd87dcb002a787ccc1c38143b09a5d04 Your Name 2019-11-24 21:46:41
built_const function not work with inheritance, so overloaded again 3ea48400586ef4dca2fe218dd7b1187a5842e879 Your Name 2019-11-24 20:41:48
added missing nodiscard attributes 592e615e8dbca2d0a5595753e35f59bf100d164f Your Name 2019-11-24 20:41:13
io_agent_memory updated 80d60ca831656db3ce47ecb21afb9cea89afe373 Your Name 2019-11-24 20:40:42
item_call now uses function pointers instead of limited methods 5e5a56a57c9d7125688f059de7eaf826dcd6dac7 Your Name 2019-11-24 20:26:59
init_move for const version 97e9eea70283e63beb10a90518ff589e8e58d0d8 Your Name 2019-11-23 01:54:17
io_agent_fs for working stream using io_agent 4e1e455b70935abba6d8a5349c725c4ee903087e Your Name 2019-11-23 01:16:10
io_agent_mem more features 0885fdf18edf22e95acda127fc7be29dc5b11f37 Your Name 2019-11-23 01:13:46
string more features d3fd117f9f4b7629d62bb7759c3a4254646f05e5 Your Name 2019-11-23 01:13:10
rarray.h new functions c8903fd687d31f8271bfdc31a491a3fd3f9d53c6 Your Name 2019-11-23 00:56:53
jfs namespace alias to jl::fs 4a220e0f7f857804d60fc22ce49097c89ea68c7b Your Name 2019-11-23 00:50:15
_bytes functions bug fix 9970eeffe63e8b0b91946a9069bb6d8ec8f333ae Your Name 2019-11-23 00:49:49
bug fixes 79097b6173165a1cf97fe3e37140dfc4b4c8769f Your Name 2019-11-23 00:47:54
Commit 41ed65d9c71ba226572b451f487ac381bdcb382d - new darray function
Author: Your Name
Author date (UTC): 2019-11-25 03:20
Committer name: Your Name
Committer date (UTC): 2019-11-25 03:20
Parent(s): e902ab04f388b331f7b0201a01591c52c0fb44a5
Signer:
Signing key:
Signing status: N
Tree: 19e3e793e3aeb1fbd9b439718a5896952d0fc105
File Lines added Lines deleted
include/jlib/darray.h 14 4
File include/jlib/darray.h changed (mode: 100644) (index e18aba3..930a1e0)
... ... namespace jl
54 54 [[nodiscard]] bool init(size_t reserved_count) [[nodiscard]] bool init(size_t reserved_count)
55 55 { {
56 56 auto size = reserved_count * sizeof(T); auto size = reserved_count * sizeof(T);
57 if (not allocate(&p_begin_allocated, size))
57 if (not allocate_bytes(&p_begin_allocated, size))
58 58 return false; return false;
59 59 p_end = p_begin_allocated; p_end = p_begin_allocated;
60 60 p_end_allocated = p_begin_allocated + size; p_end_allocated = p_begin_allocated + size;
 
... ... namespace jl
345 345 { remove(begin() + index, pfoo, args...); } { remove(begin() + index, pfoo, args...); }
346 346
347 347 /// @brief Remove last item. /// @brief Remove last item.
348 void remove_last() { p_end -= sizeof(T); }
349
348 [[nodiscard]] T remove_last()
349 {
350 p_end -= sizeof(T);
351 return *end();
352 }
350 353
354 /// @biref Put last item to *p_dst, remove and return true, if array is not empty, overwise return false.
355 [[nodiscard]] bool remove_last_if_exist(T *p_dst)
356 {
357 if (count() > 0)
358 return *p_dst = remove_last(), true;
359 return false;
360 }
351 361 /** /**
352 362 * @brief Remove items if condition is true. * @brief Remove items if condition is true.
353 363 * *
 
... ... protected:
467 477 [[nodiscard]] bool resize(size_t new_size) [[nodiscard]] bool resize(size_t new_size)
468 478 { {
469 479 auto size_used = this->size_used(); auto size_used = this->size_used();
470 if (not reallocate(&p_begin_allocated, new_size))
480 if (not reallocate_bytes(&p_begin_allocated, new_size))
471 481 return false; return false;
472 482
473 483 p_end_allocated = p_begin_allocated + new_size; p_end_allocated = p_begin_allocated + new_size;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/Jackalope/jlib

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jlib

Clone this repository using git:
git clone git://git.rocketgit.com/user/Jackalope/jlib

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main