What we need is a class with 2 methods add() and call(). When we create a class we can add using add() function a function we want to be called when call() will be called with params like (pseudocode)
new A;
new B;
A.add(B.function(int)) // B takes int as an argument
A.call(); // and call() would look like {int i; sendArrayOfSubscribers(i);}
//now we know that B.function was executed with param generated in A;
Is such a structure possible in C++?