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

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

namespace thrift { namespace test { namespace debug {

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

class SrvIf {
 public:
  virtual ~SrvIf() {}
  virtual int32_t Janky(const int32_t arg) = 0;
  virtual void voidMethod() = 0;
  virtual int32_t primitiveMethod() = 0;
  virtual void structMethod(CompactProtoTestStruct& _return) = 0;
  virtual void methodWithDefaultArgs(const int32_t something) = 0;
  virtual void onewayMethod() = 0;
  virtual bool declaredExceptionMethod(const bool shouldThrow) = 0;
};

class SrvIfFactory {
 public:
  typedef SrvIf Handler;

  virtual ~SrvIfFactory() {}

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

class SrvIfSingletonFactory : virtual public SrvIfFactory {
 public:
  SrvIfSingletonFactory(const ::std::shared_ptr<SrvIf>& iface) : iface_(iface) {}
  virtual ~SrvIfSingletonFactory() {}

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

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

class SrvNull : virtual public SrvIf {
 public:
  virtual ~SrvNull() {}
  int32_t Janky(const int32_t /* arg */) {
    int32_t _return = 0;
    return _return;
  }
  void voidMethod() {
    return;
  }
  int32_t primitiveMethod() {
    int32_t _return = 0;
    return _return;
  }
  void structMethod(CompactProtoTestStruct& /* _return */) {
    return;
  }
  void methodWithDefaultArgs(const int32_t /* something */) {
    return;
  }
  void onewayMethod() {
    return;
  }
  bool declaredExceptionMethod(const bool /* shouldThrow */) {
    bool _return = false;
    return _return;
  }
};

typedef struct _Srv_Janky_args__isset {
  _Srv_Janky_args__isset() : arg(false) {}
  bool arg :1;
} _Srv_Janky_args__isset;

class Srv_Janky_args {
 public:

  Srv_Janky_args(const Srv_Janky_args&);
  Srv_Janky_args& operator=(const Srv_Janky_args&);
  Srv_Janky_args() : arg(0) {
  }

  virtual ~Srv_Janky_args() noexcept;
  int32_t arg;

  _Srv_Janky_args__isset __isset;

  void __set_arg(const int32_t val);

  bool operator == (const Srv_Janky_args & rhs) const
  {
    if (!(arg == rhs.arg))
      return false;
    return true;
  }
  bool operator != (const Srv_Janky_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_Janky_args & ) const;

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

};


class Srv_Janky_pargs {
 public:


  virtual ~Srv_Janky_pargs() noexcept;
  const int32_t* arg;

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

};

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

class Srv_Janky_result {
 public:

  Srv_Janky_result(const Srv_Janky_result&);
  Srv_Janky_result& operator=(const Srv_Janky_result&);
  Srv_Janky_result() : success(0) {
  }

  virtual ~Srv_Janky_result() noexcept;
  int32_t success;

  _Srv_Janky_result__isset __isset;

  void __set_success(const int32_t val);

  bool operator == (const Srv_Janky_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const Srv_Janky_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_Janky_result & ) const;

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

};

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

class Srv_Janky_presult {
 public:


  virtual ~Srv_Janky_presult() noexcept;
  int32_t* success;

  _Srv_Janky_presult__isset __isset;

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

};


class Srv_voidMethod_args {
 public:

  Srv_voidMethod_args(const Srv_voidMethod_args&);
  Srv_voidMethod_args& operator=(const Srv_voidMethod_args&);
  Srv_voidMethod_args() {
  }

  virtual ~Srv_voidMethod_args() noexcept;

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

  bool operator < (const Srv_voidMethod_args & ) const;

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

};


class Srv_voidMethod_pargs {
 public:


  virtual ~Srv_voidMethod_pargs() noexcept;

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

};


class Srv_voidMethod_result {
 public:

  Srv_voidMethod_result(const Srv_voidMethod_result&);
  Srv_voidMethod_result& operator=(const Srv_voidMethod_result&);
  Srv_voidMethod_result() {
  }

  virtual ~Srv_voidMethod_result() noexcept;

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

  bool operator < (const Srv_voidMethod_result & ) const;

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

};


class Srv_voidMethod_presult {
 public:


  virtual ~Srv_voidMethod_presult() noexcept;

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

};


class Srv_primitiveMethod_args {
 public:

  Srv_primitiveMethod_args(const Srv_primitiveMethod_args&);
  Srv_primitiveMethod_args& operator=(const Srv_primitiveMethod_args&);
  Srv_primitiveMethod_args() {
  }

  virtual ~Srv_primitiveMethod_args() noexcept;

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

  bool operator < (const Srv_primitiveMethod_args & ) const;

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

};


class Srv_primitiveMethod_pargs {
 public:


  virtual ~Srv_primitiveMethod_pargs() noexcept;

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

};

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

class Srv_primitiveMethod_result {
 public:

  Srv_primitiveMethod_result(const Srv_primitiveMethod_result&);
  Srv_primitiveMethod_result& operator=(const Srv_primitiveMethod_result&);
  Srv_primitiveMethod_result() : success(0) {
  }

  virtual ~Srv_primitiveMethod_result() noexcept;
  int32_t success;

  _Srv_primitiveMethod_result__isset __isset;

  void __set_success(const int32_t val);

  bool operator == (const Srv_primitiveMethod_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const Srv_primitiveMethod_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_primitiveMethod_result & ) const;

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

};

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

class Srv_primitiveMethod_presult {
 public:


  virtual ~Srv_primitiveMethod_presult() noexcept;
  int32_t* success;

  _Srv_primitiveMethod_presult__isset __isset;

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

};


class Srv_structMethod_args {
 public:

  Srv_structMethod_args(const Srv_structMethod_args&);
  Srv_structMethod_args& operator=(const Srv_structMethod_args&);
  Srv_structMethod_args() {
  }

  virtual ~Srv_structMethod_args() noexcept;

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

  bool operator < (const Srv_structMethod_args & ) const;

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

};


class Srv_structMethod_pargs {
 public:


  virtual ~Srv_structMethod_pargs() noexcept;

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

};

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

class Srv_structMethod_result {
 public:

  Srv_structMethod_result(const Srv_structMethod_result&);
  Srv_structMethod_result& operator=(const Srv_structMethod_result&);
  Srv_structMethod_result() {
  }

  virtual ~Srv_structMethod_result() noexcept;
  CompactProtoTestStruct success;

  _Srv_structMethod_result__isset __isset;

  void __set_success(const CompactProtoTestStruct& val);

  bool operator == (const Srv_structMethod_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const Srv_structMethod_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_structMethod_result & ) const;

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

};

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

class Srv_structMethod_presult {
 public:


  virtual ~Srv_structMethod_presult() noexcept;
  CompactProtoTestStruct* success;

  _Srv_structMethod_presult__isset __isset;

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

};

typedef struct _Srv_methodWithDefaultArgs_args__isset {
  _Srv_methodWithDefaultArgs_args__isset() : something(true) {}
  bool something :1;
} _Srv_methodWithDefaultArgs_args__isset;

class Srv_methodWithDefaultArgs_args {
 public:

  Srv_methodWithDefaultArgs_args(const Srv_methodWithDefaultArgs_args&);
  Srv_methodWithDefaultArgs_args& operator=(const Srv_methodWithDefaultArgs_args&);
  Srv_methodWithDefaultArgs_args() : something(2) {
  }

  virtual ~Srv_methodWithDefaultArgs_args() noexcept;
  int32_t something;

  _Srv_methodWithDefaultArgs_args__isset __isset;

  void __set_something(const int32_t val);

  bool operator == (const Srv_methodWithDefaultArgs_args & rhs) const
  {
    if (!(something == rhs.something))
      return false;
    return true;
  }
  bool operator != (const Srv_methodWithDefaultArgs_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_methodWithDefaultArgs_args & ) const;

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

};


class Srv_methodWithDefaultArgs_pargs {
 public:


  virtual ~Srv_methodWithDefaultArgs_pargs() noexcept;
  const int32_t* something;

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

};


class Srv_methodWithDefaultArgs_result {
 public:

  Srv_methodWithDefaultArgs_result(const Srv_methodWithDefaultArgs_result&);
  Srv_methodWithDefaultArgs_result& operator=(const Srv_methodWithDefaultArgs_result&);
  Srv_methodWithDefaultArgs_result() {
  }

  virtual ~Srv_methodWithDefaultArgs_result() noexcept;

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

  bool operator < (const Srv_methodWithDefaultArgs_result & ) const;

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

};


class Srv_methodWithDefaultArgs_presult {
 public:


  virtual ~Srv_methodWithDefaultArgs_presult() noexcept;

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

};


class Srv_onewayMethod_args {
 public:

  Srv_onewayMethod_args(const Srv_onewayMethod_args&);
  Srv_onewayMethod_args& operator=(const Srv_onewayMethod_args&);
  Srv_onewayMethod_args() {
  }

  virtual ~Srv_onewayMethod_args() noexcept;

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

  bool operator < (const Srv_onewayMethod_args & ) const;

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

};


class Srv_onewayMethod_pargs {
 public:


  virtual ~Srv_onewayMethod_pargs() noexcept;

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

};

typedef struct _Srv_declaredExceptionMethod_args__isset {
  _Srv_declaredExceptionMethod_args__isset() : shouldThrow(false) {}
  bool shouldThrow :1;
} _Srv_declaredExceptionMethod_args__isset;

class Srv_declaredExceptionMethod_args {
 public:

  Srv_declaredExceptionMethod_args(const Srv_declaredExceptionMethod_args&);
  Srv_declaredExceptionMethod_args& operator=(const Srv_declaredExceptionMethod_args&);
  Srv_declaredExceptionMethod_args() : shouldThrow(0) {
  }

  virtual ~Srv_declaredExceptionMethod_args() noexcept;
  bool shouldThrow;

  _Srv_declaredExceptionMethod_args__isset __isset;

  void __set_shouldThrow(const bool val);

  bool operator == (const Srv_declaredExceptionMethod_args & rhs) const
  {
    if (!(shouldThrow == rhs.shouldThrow))
      return false;
    return true;
  }
  bool operator != (const Srv_declaredExceptionMethod_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_declaredExceptionMethod_args & ) const;

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

};


class Srv_declaredExceptionMethod_pargs {
 public:


  virtual ~Srv_declaredExceptionMethod_pargs() noexcept;
  const bool* shouldThrow;

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

};

typedef struct _Srv_declaredExceptionMethod_result__isset {
  _Srv_declaredExceptionMethod_result__isset() : success(false), xwamap(false) {}
  bool success :1;
  bool xwamap :1;
} _Srv_declaredExceptionMethod_result__isset;

class Srv_declaredExceptionMethod_result {
 public:

  Srv_declaredExceptionMethod_result(const Srv_declaredExceptionMethod_result&);
  Srv_declaredExceptionMethod_result& operator=(const Srv_declaredExceptionMethod_result&);
  Srv_declaredExceptionMethod_result() : success(0) {
  }

  virtual ~Srv_declaredExceptionMethod_result() noexcept;
  bool success;
  ExceptionWithAMap xwamap;

  _Srv_declaredExceptionMethod_result__isset __isset;

  void __set_success(const bool val);

  void __set_xwamap(const ExceptionWithAMap& val);

  bool operator == (const Srv_declaredExceptionMethod_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    if (!(xwamap == rhs.xwamap))
      return false;
    return true;
  }
  bool operator != (const Srv_declaredExceptionMethod_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Srv_declaredExceptionMethod_result & ) const;

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

};

typedef struct _Srv_declaredExceptionMethod_presult__isset {
  _Srv_declaredExceptionMethod_presult__isset() : success(false), xwamap(false) {}
  bool success :1;
  bool xwamap :1;
} _Srv_declaredExceptionMethod_presult__isset;

class Srv_declaredExceptionMethod_presult {
 public:


  virtual ~Srv_declaredExceptionMethod_presult() noexcept;
  bool* success;
  ExceptionWithAMap xwamap;

  _Srv_declaredExceptionMethod_presult__isset __isset;

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

};

class SrvClient : virtual public SrvIf {
 public:
  SrvClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
    setProtocol(prot);
  }
  SrvClient(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_;
  }
  int32_t Janky(const int32_t arg);
  void send_Janky(const int32_t arg);
  int32_t recv_Janky();
  void voidMethod();
  void send_voidMethod();
  void recv_voidMethod();
  int32_t primitiveMethod();
  void send_primitiveMethod();
  int32_t recv_primitiveMethod();
  void structMethod(CompactProtoTestStruct& _return);
  void send_structMethod();
  void recv_structMethod(CompactProtoTestStruct& _return);
  void methodWithDefaultArgs(const int32_t something);
  void send_methodWithDefaultArgs(const int32_t something);
  void recv_methodWithDefaultArgs();
  void onewayMethod();
  void send_onewayMethod();
  bool declaredExceptionMethod(const bool shouldThrow);
  void send_declaredExceptionMethod(const bool shouldThrow);
  bool recv_declaredExceptionMethod();
 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 SrvProcessor : public ::apache::thrift::TDispatchProcessor {
 protected:
  ::std::shared_ptr<SrvIf> iface_;
  virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext);
 private:
  typedef  void (SrvProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
  typedef std::map<std::string, ProcessFunction> ProcessMap;
  ProcessMap processMap_;
  void process_Janky(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_voidMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_primitiveMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_structMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_methodWithDefaultArgs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_onewayMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_declaredExceptionMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
 public:
  SrvProcessor(::std::shared_ptr<SrvIf> iface) :
    iface_(iface) {
    processMap_["Janky"] = &SrvProcessor::process_Janky;
    processMap_["voidMethod"] = &SrvProcessor::process_voidMethod;
    processMap_["primitiveMethod"] = &SrvProcessor::process_primitiveMethod;
    processMap_["structMethod"] = &SrvProcessor::process_structMethod;
    processMap_["methodWithDefaultArgs"] = &SrvProcessor::process_methodWithDefaultArgs;
    processMap_["onewayMethod"] = &SrvProcessor::process_onewayMethod;
    processMap_["declaredExceptionMethod"] = &SrvProcessor::process_declaredExceptionMethod;
  }

  virtual ~SrvProcessor() {}
};

class SrvProcessorFactory : public ::apache::thrift::TProcessorFactory {
 public:
  SrvProcessorFactory(const ::std::shared_ptr< SrvIfFactory >& handlerFactory) :
      handlerFactory_(handlerFactory) {}

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

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

class SrvMultiface : virtual public SrvIf {
 public:
  SrvMultiface(std::vector<std::shared_ptr<SrvIf> >& ifaces) : ifaces_(ifaces) {
  }
  virtual ~SrvMultiface() {}
 protected:
  std::vector<std::shared_ptr<SrvIf> > ifaces_;
  SrvMultiface() {}
  void add(::std::shared_ptr<SrvIf> iface) {
    ifaces_.push_back(iface);
  }
 public:
  int32_t Janky(const int32_t arg) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->Janky(arg);
    }
    return ifaces_[i]->Janky(arg);
  }

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

  int32_t primitiveMethod() {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->primitiveMethod();
    }
    return ifaces_[i]->primitiveMethod();
  }

  void structMethod(CompactProtoTestStruct& _return) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->structMethod(_return);
    }
    ifaces_[i]->structMethod(_return);
    return;
  }

  void methodWithDefaultArgs(const int32_t something) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->methodWithDefaultArgs(something);
    }
    ifaces_[i]->methodWithDefaultArgs(something);
  }

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

  bool declaredExceptionMethod(const bool shouldThrow) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->declaredExceptionMethod(shouldThrow);
    }
    return ifaces_[i]->declaredExceptionMethod(shouldThrow);
  }

};

// 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 SrvConcurrentClient : virtual public SrvIf {
 public:
  SrvConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(prot);
  }
  SrvConcurrentClient(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_;
  }
  int32_t Janky(const int32_t arg);
  int32_t send_Janky(const int32_t arg);
  int32_t recv_Janky(const int32_t seqid);
  void voidMethod();
  int32_t send_voidMethod();
  void recv_voidMethod(const int32_t seqid);
  int32_t primitiveMethod();
  int32_t send_primitiveMethod();
  int32_t recv_primitiveMethod(const int32_t seqid);
  void structMethod(CompactProtoTestStruct& _return);
  int32_t send_structMethod();
  void recv_structMethod(CompactProtoTestStruct& _return, const int32_t seqid);
  void methodWithDefaultArgs(const int32_t something);
  int32_t send_methodWithDefaultArgs(const int32_t something);
  void recv_methodWithDefaultArgs(const int32_t seqid);
  void onewayMethod();
  void send_onewayMethod();
  bool declaredExceptionMethod(const bool shouldThrow);
  int32_t send_declaredExceptionMethod(const bool shouldThrow);
  bool recv_declaredExceptionMethod(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
