/**
 * Autogenerated by Thrift Compiler (0.22.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#ifndef ControlPort_H
#define ControlPort_H

#include <thrift/TDispatchProcessor.h>
#include <thrift/async/TConcurrentClientSyncInfo.h>
#include <memory>
#include "gnuradio_types.h"

namespace GNURadio {

#ifdef _MSC_VER
  #pragma warning( push )
  #pragma warning (disable : 4250 ) //inheriting methods via dominance 
#endif

class ControlPortIf {
 public:
  virtual ~ControlPortIf() {}
  virtual void setKnobs(const KnobMap& knobs) = 0;
  virtual void getKnobs(KnobMap& _return, const KnobIDList& knobs) = 0;
  virtual void getRe(KnobMap& _return, const KnobIDList& knobs) = 0;
  virtual void properties(KnobPropMap& _return, const KnobIDList& knobs) = 0;
  virtual void postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg) = 0;
  virtual void shutdown() = 0;
};

class ControlPortIfFactory {
 public:
  typedef ControlPortIf Handler;

  virtual ~ControlPortIfFactory() {}

  virtual ControlPortIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
  virtual void releaseHandler(ControlPortIf* /* handler */) = 0;
  };

class ControlPortIfSingletonFactory : virtual public ControlPortIfFactory {
 public:
  ControlPortIfSingletonFactory(const ::std::shared_ptr<ControlPortIf>& iface) : iface_(iface) {}
  virtual ~ControlPortIfSingletonFactory() {}

  virtual ControlPortIf* getHandler(const ::apache::thrift::TConnectionInfo&) override {
    return iface_.get();
  }
  virtual void releaseHandler(ControlPortIf* /* handler */) override {}

 protected:
  ::std::shared_ptr<ControlPortIf> iface_;
};

class ControlPortNull : virtual public ControlPortIf {
 public:
  virtual ~ControlPortNull() {}
  void setKnobs(const KnobMap& /* knobs */) override {
    return;
  }
  void getKnobs(KnobMap& /* _return */, const KnobIDList& /* knobs */) override {
    return;
  }
  void getRe(KnobMap& /* _return */, const KnobIDList& /* knobs */) override {
    return;
  }
  void properties(KnobPropMap& /* _return */, const KnobIDList& /* knobs */) override {
    return;
  }
  void postMessage(const std::string& /* blk_alias */, const std::string& /* port */, const std::string& /* msg */) override {
    return;
  }
  void shutdown() override {
    return;
  }
};

typedef struct _ControlPort_setKnobs_args__isset {
  _ControlPort_setKnobs_args__isset() : knobs(false) {}
  bool knobs :1;
} _ControlPort_setKnobs_args__isset;

class ControlPort_setKnobs_args {
 public:

  ControlPort_setKnobs_args(const ControlPort_setKnobs_args&);
  ControlPort_setKnobs_args& operator=(const ControlPort_setKnobs_args&);
  ControlPort_setKnobs_args() noexcept;

  virtual ~ControlPort_setKnobs_args() noexcept;
  KnobMap knobs;

  _ControlPort_setKnobs_args__isset __isset;

  void __set_knobs(const KnobMap& val);

  bool operator == (const ControlPort_setKnobs_args & rhs) const;
  bool operator != (const ControlPort_setKnobs_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_setKnobs_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_setKnobs_pargs {
 public:


  virtual ~ControlPort_setKnobs_pargs() noexcept;
  const KnobMap* knobs;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_setKnobs_result {
 public:

  ControlPort_setKnobs_result(const ControlPort_setKnobs_result&) noexcept;
  ControlPort_setKnobs_result& operator=(const ControlPort_setKnobs_result&) noexcept;
  ControlPort_setKnobs_result() noexcept;

  virtual ~ControlPort_setKnobs_result() noexcept;

  bool operator == (const ControlPort_setKnobs_result & /* rhs */) const;
  bool operator != (const ControlPort_setKnobs_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_setKnobs_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_setKnobs_presult {
 public:


  virtual ~ControlPort_setKnobs_presult() noexcept;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ControlPort_getKnobs_args__isset {
  _ControlPort_getKnobs_args__isset() : knobs(false) {}
  bool knobs :1;
} _ControlPort_getKnobs_args__isset;

class ControlPort_getKnobs_args {
 public:

  ControlPort_getKnobs_args(const ControlPort_getKnobs_args&);
  ControlPort_getKnobs_args& operator=(const ControlPort_getKnobs_args&);
  ControlPort_getKnobs_args() noexcept;

  virtual ~ControlPort_getKnobs_args() noexcept;
  KnobIDList knobs;

  _ControlPort_getKnobs_args__isset __isset;

  void __set_knobs(const KnobIDList& val);

  bool operator == (const ControlPort_getKnobs_args & rhs) const;
  bool operator != (const ControlPort_getKnobs_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_getKnobs_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_getKnobs_pargs {
 public:


  virtual ~ControlPort_getKnobs_pargs() noexcept;
  const KnobIDList* knobs;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_getKnobs_result__isset {
  _ControlPort_getKnobs_result__isset() : success(false) {}
  bool success :1;
} _ControlPort_getKnobs_result__isset;

class ControlPort_getKnobs_result {
 public:

  ControlPort_getKnobs_result(const ControlPort_getKnobs_result&);
  ControlPort_getKnobs_result& operator=(const ControlPort_getKnobs_result&);
  ControlPort_getKnobs_result() noexcept;

  virtual ~ControlPort_getKnobs_result() noexcept;
  KnobMap success;

  _ControlPort_getKnobs_result__isset __isset;

  void __set_success(const KnobMap& val);

  bool operator == (const ControlPort_getKnobs_result & rhs) const;
  bool operator != (const ControlPort_getKnobs_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_getKnobs_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_getKnobs_presult__isset {
  _ControlPort_getKnobs_presult__isset() : success(false) {}
  bool success :1;
} _ControlPort_getKnobs_presult__isset;

class ControlPort_getKnobs_presult {
 public:


  virtual ~ControlPort_getKnobs_presult() noexcept;
  KnobMap* success;

  _ControlPort_getKnobs_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ControlPort_getRe_args__isset {
  _ControlPort_getRe_args__isset() : knobs(false) {}
  bool knobs :1;
} _ControlPort_getRe_args__isset;

class ControlPort_getRe_args {
 public:

  ControlPort_getRe_args(const ControlPort_getRe_args&);
  ControlPort_getRe_args& operator=(const ControlPort_getRe_args&);
  ControlPort_getRe_args() noexcept;

  virtual ~ControlPort_getRe_args() noexcept;
  KnobIDList knobs;

  _ControlPort_getRe_args__isset __isset;

  void __set_knobs(const KnobIDList& val);

  bool operator == (const ControlPort_getRe_args & rhs) const;
  bool operator != (const ControlPort_getRe_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_getRe_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_getRe_pargs {
 public:


  virtual ~ControlPort_getRe_pargs() noexcept;
  const KnobIDList* knobs;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_getRe_result__isset {
  _ControlPort_getRe_result__isset() : success(false) {}
  bool success :1;
} _ControlPort_getRe_result__isset;

class ControlPort_getRe_result {
 public:

  ControlPort_getRe_result(const ControlPort_getRe_result&);
  ControlPort_getRe_result& operator=(const ControlPort_getRe_result&);
  ControlPort_getRe_result() noexcept;

  virtual ~ControlPort_getRe_result() noexcept;
  KnobMap success;

  _ControlPort_getRe_result__isset __isset;

  void __set_success(const KnobMap& val);

  bool operator == (const ControlPort_getRe_result & rhs) const;
  bool operator != (const ControlPort_getRe_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_getRe_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_getRe_presult__isset {
  _ControlPort_getRe_presult__isset() : success(false) {}
  bool success :1;
} _ControlPort_getRe_presult__isset;

class ControlPort_getRe_presult {
 public:


  virtual ~ControlPort_getRe_presult() noexcept;
  KnobMap* success;

  _ControlPort_getRe_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ControlPort_properties_args__isset {
  _ControlPort_properties_args__isset() : knobs(false) {}
  bool knobs :1;
} _ControlPort_properties_args__isset;

class ControlPort_properties_args {
 public:

  ControlPort_properties_args(const ControlPort_properties_args&);
  ControlPort_properties_args& operator=(const ControlPort_properties_args&);
  ControlPort_properties_args() noexcept;

  virtual ~ControlPort_properties_args() noexcept;
  KnobIDList knobs;

  _ControlPort_properties_args__isset __isset;

  void __set_knobs(const KnobIDList& val);

  bool operator == (const ControlPort_properties_args & rhs) const;
  bool operator != (const ControlPort_properties_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_properties_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_properties_pargs {
 public:


  virtual ~ControlPort_properties_pargs() noexcept;
  const KnobIDList* knobs;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_properties_result__isset {
  _ControlPort_properties_result__isset() : success(false) {}
  bool success :1;
} _ControlPort_properties_result__isset;

class ControlPort_properties_result {
 public:

  ControlPort_properties_result(const ControlPort_properties_result&);
  ControlPort_properties_result& operator=(const ControlPort_properties_result&);
  ControlPort_properties_result() noexcept;

  virtual ~ControlPort_properties_result() noexcept;
  KnobPropMap success;

  _ControlPort_properties_result__isset __isset;

  void __set_success(const KnobPropMap& val);

  bool operator == (const ControlPort_properties_result & rhs) const;
  bool operator != (const ControlPort_properties_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_properties_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ControlPort_properties_presult__isset {
  _ControlPort_properties_presult__isset() : success(false) {}
  bool success :1;
} _ControlPort_properties_presult__isset;

class ControlPort_properties_presult {
 public:


  virtual ~ControlPort_properties_presult() noexcept;
  KnobPropMap* success;

  _ControlPort_properties_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ControlPort_postMessage_args__isset {
  _ControlPort_postMessage_args__isset() : blk_alias(false), port(false), msg(false) {}
  bool blk_alias :1;
  bool port :1;
  bool msg :1;
} _ControlPort_postMessage_args__isset;

class ControlPort_postMessage_args {
 public:

  ControlPort_postMessage_args(const ControlPort_postMessage_args&);
  ControlPort_postMessage_args& operator=(const ControlPort_postMessage_args&);
  ControlPort_postMessage_args() noexcept;

  virtual ~ControlPort_postMessage_args() noexcept;
  std::string blk_alias;
  std::string port;
  std::string msg;

  _ControlPort_postMessage_args__isset __isset;

  void __set_blk_alias(const std::string& val);

  void __set_port(const std::string& val);

  void __set_msg(const std::string& val);

  bool operator == (const ControlPort_postMessage_args & rhs) const;
  bool operator != (const ControlPort_postMessage_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_postMessage_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_postMessage_pargs {
 public:


  virtual ~ControlPort_postMessage_pargs() noexcept;
  const std::string* blk_alias;
  const std::string* port;
  const std::string* msg;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_postMessage_result {
 public:

  ControlPort_postMessage_result(const ControlPort_postMessage_result&) noexcept;
  ControlPort_postMessage_result& operator=(const ControlPort_postMessage_result&) noexcept;
  ControlPort_postMessage_result() noexcept;

  virtual ~ControlPort_postMessage_result() noexcept;

  bool operator == (const ControlPort_postMessage_result & /* rhs */) const;
  bool operator != (const ControlPort_postMessage_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_postMessage_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_postMessage_presult {
 public:


  virtual ~ControlPort_postMessage_presult() noexcept;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class ControlPort_shutdown_args {
 public:

  ControlPort_shutdown_args(const ControlPort_shutdown_args&) noexcept;
  ControlPort_shutdown_args& operator=(const ControlPort_shutdown_args&) noexcept;
  ControlPort_shutdown_args() noexcept;

  virtual ~ControlPort_shutdown_args() noexcept;

  bool operator == (const ControlPort_shutdown_args & /* rhs */) const;
  bool operator != (const ControlPort_shutdown_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_shutdown_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_shutdown_pargs {
 public:


  virtual ~ControlPort_shutdown_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_shutdown_result {
 public:

  ControlPort_shutdown_result(const ControlPort_shutdown_result&) noexcept;
  ControlPort_shutdown_result& operator=(const ControlPort_shutdown_result&) noexcept;
  ControlPort_shutdown_result() noexcept;

  virtual ~ControlPort_shutdown_result() noexcept;

  bool operator == (const ControlPort_shutdown_result & /* rhs */) const;
  bool operator != (const ControlPort_shutdown_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ControlPort_shutdown_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ControlPort_shutdown_presult {
 public:


  virtual ~ControlPort_shutdown_presult() noexcept;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

class ControlPortClient : virtual public ControlPortIf {
 public:
  ControlPortClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
    setProtocol(prot);
  }
  ControlPortClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    setProtocol(iprot,oprot);
  }
 private:
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
  setProtocol(prot,prot);
  }
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    piprot_=iprot;
    poprot_=oprot;
    iprot_ = iprot.get();
    oprot_ = oprot.get();
  }
 public:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  void setKnobs(const KnobMap& knobs) override;
  void send_setKnobs(const KnobMap& knobs);
  void recv_setKnobs();
  void getKnobs(KnobMap& _return, const KnobIDList& knobs) override;
  void send_getKnobs(const KnobIDList& knobs);
  void recv_getKnobs(KnobMap& _return);
  void getRe(KnobMap& _return, const KnobIDList& knobs) override;
  void send_getRe(const KnobIDList& knobs);
  void recv_getRe(KnobMap& _return);
  void properties(KnobPropMap& _return, const KnobIDList& knobs) override;
  void send_properties(const KnobIDList& knobs);
  void recv_properties(KnobPropMap& _return);
  void postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg) override;
  void send_postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg);
  void recv_postMessage();
  void shutdown() override;
  void send_shutdown();
  void recv_shutdown();
 protected:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
  ::apache::thrift::protocol::TProtocol* iprot_;
  ::apache::thrift::protocol::TProtocol* oprot_;
};

class ControlPortProcessor : public ::apache::thrift::TDispatchProcessor {
 protected:
  ::std::shared_ptr<ControlPortIf> iface_;
  virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) override;
 private:
  typedef  void (ControlPortProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
  typedef std::map<std::string, ProcessFunction> ProcessMap;
  ProcessMap processMap_;
  void process_setKnobs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getKnobs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getRe(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_properties(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_postMessage(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_shutdown(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
 public:
  ControlPortProcessor(::std::shared_ptr<ControlPortIf> iface) :
    iface_(iface) {
    processMap_["setKnobs"] = &ControlPortProcessor::process_setKnobs;
    processMap_["getKnobs"] = &ControlPortProcessor::process_getKnobs;
    processMap_["getRe"] = &ControlPortProcessor::process_getRe;
    processMap_["properties"] = &ControlPortProcessor::process_properties;
    processMap_["postMessage"] = &ControlPortProcessor::process_postMessage;
    processMap_["shutdown"] = &ControlPortProcessor::process_shutdown;
  }

  virtual ~ControlPortProcessor() {}
};

class ControlPortProcessorFactory : public ::apache::thrift::TProcessorFactory {
 public:
  ControlPortProcessorFactory(const ::std::shared_ptr< ControlPortIfFactory >& handlerFactory) noexcept :
      handlerFactory_(handlerFactory) {}

  ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) override;

 protected:
  ::std::shared_ptr< ControlPortIfFactory > handlerFactory_;
};

class ControlPortMultiface : virtual public ControlPortIf {
 public:
  ControlPortMultiface(std::vector<std::shared_ptr<ControlPortIf> >& ifaces) : ifaces_(ifaces) {
  }
  virtual ~ControlPortMultiface() {}
 protected:
  std::vector<std::shared_ptr<ControlPortIf> > ifaces_;
  ControlPortMultiface() {}
  void add(::std::shared_ptr<ControlPortIf> iface) {
    ifaces_.push_back(iface);
  }
 public:
  void setKnobs(const KnobMap& knobs) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->setKnobs(knobs);
    }
    ifaces_[i]->setKnobs(knobs);
  }

  void getKnobs(KnobMap& _return, const KnobIDList& knobs) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getKnobs(_return, knobs);
    }
    ifaces_[i]->getKnobs(_return, knobs);
    return;
  }

  void getRe(KnobMap& _return, const KnobIDList& knobs) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getRe(_return, knobs);
    }
    ifaces_[i]->getRe(_return, knobs);
    return;
  }

  void properties(KnobPropMap& _return, const KnobIDList& knobs) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->properties(_return, knobs);
    }
    ifaces_[i]->properties(_return, knobs);
    return;
  }

  void postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg) override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->postMessage(blk_alias, port, msg);
    }
    ifaces_[i]->postMessage(blk_alias, port, msg);
  }

  void shutdown() override {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->shutdown();
    }
    ifaces_[i]->shutdown();
  }

};

// The 'concurrent' client is a thread safe client that correctly handles
// out of order responses.  It is slower than the regular client, so should
// only be used when you need to share a connection among multiple threads
class ControlPortConcurrentClient : virtual public ControlPortIf {
 public:
  ControlPortConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(prot);
  }
  ControlPortConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(iprot,oprot);
  }
 private:
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
  setProtocol(prot,prot);
  }
  void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
    piprot_=iprot;
    poprot_=oprot;
    iprot_ = iprot.get();
    oprot_ = oprot.get();
  }
 public:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  void setKnobs(const KnobMap& knobs) override;
  int32_t send_setKnobs(const KnobMap& knobs);
  void recv_setKnobs(const int32_t seqid);
  void getKnobs(KnobMap& _return, const KnobIDList& knobs) override;
  int32_t send_getKnobs(const KnobIDList& knobs);
  void recv_getKnobs(KnobMap& _return, const int32_t seqid);
  void getRe(KnobMap& _return, const KnobIDList& knobs) override;
  int32_t send_getRe(const KnobIDList& knobs);
  void recv_getRe(KnobMap& _return, const int32_t seqid);
  void properties(KnobPropMap& _return, const KnobIDList& knobs) override;
  int32_t send_properties(const KnobIDList& knobs);
  void recv_properties(KnobPropMap& _return, const int32_t seqid);
  void postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg) override;
  int32_t send_postMessage(const std::string& blk_alias, const std::string& port, const std::string& msg);
  void recv_postMessage(const int32_t seqid);
  void shutdown() override;
  int32_t send_shutdown();
  void recv_shutdown(const int32_t seqid);
 protected:
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
  std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
  ::apache::thrift::protocol::TProtocol* iprot_;
  ::apache::thrift::protocol::TProtocol* oprot_;
  std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync_;
};

#ifdef _MSC_VER
  #pragma warning( pop )
#endif

} // namespace

#endif
