/******************************************************************
 *
 *    THIS FILE HAS BEEN AUTOGENERATED, DO NOT MODIFY
 *
 ******************************************************************/

#ifndef GEN_{{file_id}}_LISTENER_H_
#define GEN_{{file_id}}_LISTENER_H_

#include "{{services_header}}"
#include <zmq.hpp>

namespace {{namespace}} {

class {{name}}Listener {
 public:
  virtual ~{{name}}Listener() = default;
  {{name}}Listener(std::string address {% for s in services -%}, ::{{namespace}}::{{s.name}} &{{ s.var_name }} {% endfor %})
      : _zmq(1), _address(std::move(address)) {% for s in services -%}, _{{s.var_name}}({{s.var_name}}) {% endfor %} {}
  void DoReceive();
 private:
  std::string _address;
  zmq::context_t _zmq;
  {% for s in services -%}
  ::{{namespace}}::{{s.name}} &_{{ s.var_name }};
  {% endfor %}
};

}

#endif  // GEN_{{file_id}}_LISTENER_H_
