handle: Make it possible to reference stored data

Users of the handle often want to be able to reference data they plan to
use in their callbacks. This is especially useful for retrieving
references to dependency injected interfaces.

Change-Id: I2782794d7d8320e3a0dd7f47320e35d75303167a
Signed-off-by: William A. Kennington III <wak@google.com>
1 file changed
tree: e0fa4f233363aed850af44db69c7a05f0e3ba6dd
  1. example/
  2. src/
  3. test/
  4. .clang-format
  5. .lcovrc
  6. LICENSE
  7. MAINTAINERS
  8. meson.build
  9. meson_options.txt
  10. README.md
README.md

stdplus

stdplus is a c++ project containing commonly used classes and functions for the Linux platform. Note the goals of this project are to implement only the minimum set of features needed by the OpenBMC project and other users. You may find the included set of functions currently quite sparse.

This project provides the following primitives:

  • A movable and copyable RAII helper wrapper which is used for wrapping c-native types that have custom destruction or copy reference logic.
  • Functions for trivially configuring signals without having to do the normal signal set operations from libc
  • C-Style Error Handler that wrap c-style functions which return errnos and negative error values into functions that throw c++ exceptions.

Dependencies

Test cases require google{test,mock}, valgrind, and lcov.

Building

For a standard release build, you want something like:

./bootstrap.sh
./configure --disable-examples --disable-tests
make
make install

For a test / debug build, a typical configuration is

./bootstrap.sh
./configure --enable-tests --enable-coverage --enable-valgrind
make
make check
make check-valgrind
make check-code-coverage