initial implementation

This commit is contained in:
Roland Conybeare 2023-10-10 12:32:34 -04:00
commit 487f516a3f
5 changed files with 402 additions and 0 deletions

View file

@ -0,0 +1,14 @@
# callback/CMakeLists.txt
set(SELF_LIB callback)
set(SELF_SRCS CallbackSet.cpp)
# reminder: can't be header-only library, because depends on non-header-only refcnt
xo_add_shared_library(${SELF_LIB} ${PROJECT_VERSION} 1 ${SELF_SRCS})
# ----------------------------------------------------------------
# external dependencies:
xo_dependency(${SELF_LIB} refcnt)
# end CMakeLists.txt

View file

@ -0,0 +1,22 @@
/* file CallbackSet.cpp
*
* author: Roland Conybeare, Sep 2022
*/
#include "CallbackSet.hpp"
namespace xo {
namespace fn {
CallbackId
CallbackId::generate()
{
static CallbackId s_last_id;
s_last_id = CallbackId(s_last_id.id() + 1);
return s_last_id;
} /*generate*/
} /*namespace fn*/
} /*namespace xo*/
/* end CallbackSet.cpp */