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 destroy&callitems function for rarray 2cd6ee9b7345571555fe0987a47792b0c4f72d72 Your Name 2019-11-28 07:55:43
io_agent_mem.h identation changed from 4 to 3 d26588b1a1f71a0b98c17cf620b0bb1542a47d11 Your Name 2019-11-28 03:34:33
pass by pointer while inserting f8259daaa4477e7e5a568b15c23e6f717ce13f42 Your Name 2019-11-27 21:49:42
simplified convertions implementation 5dbd1b6cd3a06b87922a0778bc223693b547ea97 jp.larry 2019-11-27 05:56:37
take ref 739086550cb4ef85d10e083110253ee48820b47b jp.larry 2019-11-27 05:55:55
bug fix f150d538a332788ec41635e37f1d89e41e2d73f3 jp.larry 2019-11-27 05:55:11
more bugs solved d8d2fb72dfd2a3718ff6f26e68d64f5c7d02a348 Your Name 2019-11-27 04:29:04
replaced built_move, built_const and init_move with constructors, for emulating initializer-lists bd60c52d8e0d475dd69f11a48c05224507cfae0e Your Name 2019-11-27 03:42:54
make free deprecated a68c1b809ddc5c2a0018142a8435c67b8e4e0cf6 Your Name 2019-11-26 22:13:26
new template data structure jl::array as static c-array wrapper 68ff5a4049985d4ed013d0976b32e0613bb11ff0 jp.larry 2019-11-25 20:16:39
jassert release macro was wrong 97964f5cf3485502675b77b4df5b322921355cf7 jp.larry 2019-11-25 20:15:13
darray insert functions without checking for resize 0a168f4fc057f697bec6ad1f90faaaa7977c9537 Your Name 2019-11-25 08:39:45
replaced free with jl::deallocate 1d25f7cfe0a36ce04eeb8a6a08dc9f9eefe5c2df Your Name 2019-11-25 07:28:42
jabort_release and jassert_release macros 71349de13d880a9a13eb7cca9c46d460c30705b2 Your Name 2019-11-25 07:00:50
endianness convertion function fbff0fbb13891f7ad2975e226476cf0b56eabb36 Your Name 2019-11-25 06:06:17
overwise -> otherwise 89d07c9f30aba52e50526b0ecf1ed6eddb791764 Your Name 2019-11-25 06:01:13
init function was incorrect 6c820a36720b41b2efbfcf101bd12eb43f69a91d Your Name 2019-11-25 05:59:05
time struct for time measurements d6e362c72596c97abbd7c6f87c25eca1d3127c46 Your Name 2019-11-25 05:58:50
jassert macro, assert alternative e5b46d371c19ec6608c861c8b93a9963f117ec6d Your Name 2019-11-25 05:43:03
typo 14b869ada95c37bcc75a549cdcedae1b0b2ba76d Your Name 2019-11-25 03:27:12
Commit 2cd6ee9b7345571555fe0987a47792b0c4f72d72 - new destroy&callitems function for rarray
Author: Your Name
Author date (UTC): 2019-11-28 07:55
Committer name: Your Name
Committer date (UTC): 2019-11-28 07:55
Parent(s): d26588b1a1f71a0b98c17cf620b0bb1542a47d11
Signer:
Signing key:
Signing status: N
Tree: e0065b4bc77b7fc9aa2ba7bd1d1b5b3e5cb3e9ff
File Lines added Lines deleted
include/jlib/darray.h 4 11
include/jlib/rarray.h 26 3
File include/jlib/darray.h changed (mode: 100644) (index 337c47c..8750784)
... ... namespace jl
82 82 * @tparam P_FOO Type of pointer to function or to member function. * @tparam P_FOO Type of pointer to function or to member function.
83 83 * @tparam Args Parameters pack template, should not be specified in template instantiation * @tparam Args Parameters pack template, should not be specified in template instantiation
84 84 * @param[in] pfoo Pointer to function with first argument must be * @param[in] pfoo Pointer to function with first argument must be
85 * copy or refference of item (T*) or pointer to member function.
85 * copy or refference of item (T) or pointer to member function.
86 86 * @param[in,out] args Pack of arguments to pass to pfoo function. * @param[in,out] args Pack of arguments to pass to pfoo function.
87 87 */ */
88 88 template<typename P_FOO, typename ... Args> template<typename P_FOO, typename ... Args>
 
... ... namespace jl
106 106 deallocate(&p_begin_allocated); deallocate(&p_begin_allocated);
107 107 init(); init();
108 108 } }
109
109 110 /** /**
110 * @brief Call function for all items and deallocate memory.
111 *
112 * All items in the array will be unavailable after.
113 *
114 * @tparam P_FOO Type of pointer to function or to member function.
115 * @tparam Args Parameters pack template, should not be specified in template instantiation
116 * @param[in] pfoo Pointer to function with first argument must be pointer to item (T*)
117 * or pointer to member function.
118 * @param[in,out] args Pack of arguments to pass to pfoo function.
111 * @brief Clean and destroy.
119 112 * *
120 * @see darray::clean
113 * @see darray::clean(P_FOO pfoo, Args ... args)
121 114 * @see darray::destroy * @see darray::destroy
122 115 */ */
123 116 template<typename P_FOO, typename ... Args> template<typename P_FOO, typename ... Args>
File include/jlib/rarray.h changed (mode: 100644) (index e30eccd..2eaebbc)
7 7
8 8 #include "routines.h" #include "routines.h"
9 9 #include "allocate.h" #include "allocate.h"
10 #include <cinttypes>
11 10 #include "assert.h" #include "assert.h"
12
11 #include "staff/item_call.h"
13 12 #include <type_traits> #include <type_traits>
13 #include <cinttypes>
14 14
15 15 namespace jl namespace jl
16 16 { {
 
... ... namespace jl
114 114 * @brief Deallocate space, set item count to 0. * @brief Deallocate space, set item count to 0.
115 115 * *
116 116 * Function reduce used elements count to 0, by deallocating memory. * Function reduce used elements count to 0, by deallocating memory.
117 * Array items will be unaccessible after, so they must be cleaned up before this function.
117 * Array items will be unaccessible after,
118 * so they must be cleaned up before this function.
118 119 */ */
119 120 void destroy() void destroy()
120 121 { {
 
... ... namespace jl
122 123 init(); init();
123 124 } }
124 125
126 /**
127 * @brief Call function for all items and destroy array.
128 *
129 * All items in the array will be unavailable after.
130 *
131 * @tparam P_FOO Type of pointer to function or member function.
132 * @tparam Args Parameters pack template, should not be
133 * specified in template instantiation
134 * @param[in] pfoo Pointer to function with first argument,
135 * copy or refference of item (T)
136 * or pointer to member function.
137 * @param[in,out] args Pack of arguments to pass to pfoo function.
138 *
139 * @see rarray::destroy
140 */
141 template<typename P_FOO, typename ... Args>
142 void destroy(P_FOO pfoo, Args ... args) {
143 for (auto &item : *this)
144 details::item_call::call(item, pfoo, args...);
145 destroy();
146 }
147
125 148 /** /**
126 149 * @brief Reallocate space, set item count to specified value. * @brief Reallocate space, set item count to specified value.
127 150 * *
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