Skip to content
István Simon edited this page May 19, 2018 · 1 revision

Hello World!

...

class HelloWorld
    : public Node<Name, Trigger>
{
public:
    HelloWorld(std::string const & name)
        : TriggerNode(name)
    {
        set_trigger_function([this](){ queuing_task(); });
    }

protected:
    void process() final
    {
        std::cout << "Hello world" << std::endl;
    }
};

...

void main()
{
    HelloWorld hi("hello");
    hi.start();
    hi.trigger();
    hi.stop();
}
Clone this wiki locally