59 Commits

Author SHA1 Message Date
Markus Mäkelä
602f977be6
MXS-1810: Add mxs::Checksum class
The class is a wrapper to the SHA1 function. This should make checksum
calculations over buffers easier.
2018-04-26 13:44:23 +03:00
Markus Mäkelä
755d080161
MXS-1810: Add C++ hex conversion functions
Added mxs::to_hex for uint8_t types and uint8_t containers.
2018-04-26 13:44:23 +03:00
Markus Mäkelä
640501c03a
MXS-1810: Format utils.hh
Formatted utils.hh with Astyle.
2018-04-26 13:44:23 +03:00
Markus Mäkelä
221658299d
MXS-1502: Derive EqualPointees from std::unary_function
This is done to make it clear that the class is intended to be used as an
unary function.
2018-04-03 16:27:18 +03:00
Markus Mäkelä
98fb2cf5ed
MXS-1503: Add EqualPointees<T> template
The templated provides an unary predicate for (shared) pointers that
allows containers containing pointers to objects to be searched, not by
pointer comparisons but by comparisons of the values that they point
to. This allows std::find_if to be used with shared pointers in a similar
manner that std::find is used with non-pointer objects.
2018-04-03 13:31:40 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Esa Korhonen
dbfd631fed Change session registry to a template class
The template class wraps a HashMap such that only a few operations
are allowed. Usage requires specializing a RegistryTraits class
template for each entry type.
2017-05-19 10:16:37 +03:00
Johan Wikman
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
Johan Wikman
0b4c379539 Add Closer, partial RAII class
Closer is a template using which C-style resources can be managed
in a C++ context where exceptions can occur. By placing a C resource
in a Closer instance, it is certain the resource will be freed when
the closing scope is exited irrespective of whether that occurs due
to the normal control flow, due to a return statement or an exception
having been thrown.

To be used with Closer, the CloserTraits template must be specialized
for the type in question. With this change specializations are provided
for FILE*, json_t*, pcre_code* and pcre2_match_data*.
2017-01-09 09:19:59 +02:00