none
C++ - Implement custom message block with Asynchronous Agents Library RRS feed

  • Question

  • I tried to implement a custom message block similar to transformer, but it takes multiple inputs with different input types, then performs transform function and store output to a buffer. However, I take a look at the agents.h, the propagator_block only allows to specify one type of input/output. Is there anyone have any idea to implement a custom message block that can take different types of input?

    Here is my class definition for single input/output type:

        template<typename _Input, typename _Output>
        class GenericTransformer : public propagator_block<multi_link_registry<ITarget<_Output>>, multi_link_registry<ISource<_Input>>>
        {
        };

    But for multiple input types, I don't know how to specify them in multi_link_registry class:

        template<typename _Input1, typename _Input2, typename _Output>
        class GenericTransformer : public propagator_block<multi_link_registry<ITarget<_Output>>, multi_link_registry<ISource<_Input???>>>
        {
        };
    Tuesday, December 2, 2014 3:24 AM