/**
 * Autogenerated by Thrift Compiler (0.13.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#ifndef ReverseOrderService_H
#define ReverseOrderService_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 ReverseOrderServiceIf {
 public:
  virtual ~ReverseOrderServiceIf() {}
  virtual void myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth) = 0;
};

class ReverseOrderServiceIfFactory {
 public:
  typedef ReverseOrderServiceIf Handler;

  virtual ~ReverseOrderServiceIfFactory() {}

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

class ReverseOrderServiceIfSingletonFactory : virtual public ReverseOrderServiceIfFactory {
 public:
  ReverseOrderServiceIfSingletonFactory(const ::std::shared_ptr<ReverseOrderServiceIf>& iface) : iface_(iface) {}
  virtual ~ReverseOrderServiceIfSingletonFactory() {}

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

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

class ReverseOrderServiceNull : virtual public ReverseOrderServiceIf {
 public:
  virtual ~ReverseOrderServiceNull() {}
  void myMethod(const std::string& /* first */, const int16_t /* second */, const int32_t /* third */, const int64_t /* fourth */) {
    return;
  }
};

typedef struct _ReverseOrderService_myMethod_args__isset {
  _ReverseOrderService_myMethod_args__isset() : first(false), second(false), third(false), fourth(false) {}
  bool first :1;
  bool second :1;
  bool third :1;
  bool fourth :1;
} _ReverseOrderService_myMethod_args__isset;

class ReverseOrderService_myMethod_args {
 public:

  ReverseOrderService_myMethod_args(const ReverseOrderService_myMethod_args&);
  ReverseOrderService_myMethod_args& operator=(const ReverseOrderService_myMethod_args&);
  ReverseOrderService_myMethod_args() : first(), second(0), third(0), fourth(0) {
  }

  virtual ~ReverseOrderService_myMethod_args() noexcept;
  std::string first;
  int16_t second;
  int32_t third;
  int64_t fourth;

  _ReverseOrderService_myMethod_args__isset __isset;

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

  void __set_second(const int16_t val);

  void __set_third(const int32_t val);

  void __set_fourth(const int64_t val);

  bool operator == (const ReverseOrderService_myMethod_args & rhs) const
  {
    if (!(first == rhs.first))
      return false;
    if (!(second == rhs.second))
      return false;
    if (!(third == rhs.third))
      return false;
    if (!(fourth == rhs.fourth))
      return false;
    return true;
  }
  bool operator != (const ReverseOrderService_myMethod_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ReverseOrderService_myMethod_args & ) const;

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

};


class ReverseOrderService_myMethod_pargs {
 public:


  virtual ~ReverseOrderService_myMethod_pargs() noexcept;
  const std::string* first;
  const int16_t* second;
  const int32_t* third;
  const int64_t* fourth;

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

};


class ReverseOrderService_myMethod_result {
 public:

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

  virtual ~ReverseOrderService_myMethod_result() noexcept;

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

  bool operator < (const ReverseOrderService_myMethod_result & ) const;

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

};


class ReverseOrderService_myMethod_presult {
 public:


  virtual ~ReverseOrderService_myMethod_presult() noexcept;

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

};

class ReverseOrderServiceClient : virtual public ReverseOrderServiceIf {
 public:
  ReverseOrderServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
    setProtocol(prot);
  }
  ReverseOrderServiceClient(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 myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth);
  void send_myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth);
  void recv_myMethod();
 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 ReverseOrderServiceProcessor : public ::apache::thrift::TDispatchProcessor {
 protected:
  ::std::shared_ptr<ReverseOrderServiceIf> 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 (ReverseOrderServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
  typedef std::map<std::string, ProcessFunction> ProcessMap;
  ProcessMap processMap_;
  void process_myMethod(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
 public:
  ReverseOrderServiceProcessor(::std::shared_ptr<ReverseOrderServiceIf> iface) :
    iface_(iface) {
    processMap_["myMethod"] = &ReverseOrderServiceProcessor::process_myMethod;
  }

  virtual ~ReverseOrderServiceProcessor() {}
};

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

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

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

class ReverseOrderServiceMultiface : virtual public ReverseOrderServiceIf {
 public:
  ReverseOrderServiceMultiface(std::vector<std::shared_ptr<ReverseOrderServiceIf> >& ifaces) : ifaces_(ifaces) {
  }
  virtual ~ReverseOrderServiceMultiface() {}
 protected:
  std::vector<std::shared_ptr<ReverseOrderServiceIf> > ifaces_;
  ReverseOrderServiceMultiface() {}
  void add(::std::shared_ptr<ReverseOrderServiceIf> iface) {
    ifaces_.push_back(iface);
  }
 public:
  void myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->myMethod(first, second, third, fourth);
    }
    ifaces_[i]->myMethod(first, second, third, fourth);
  }

};

// 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 ReverseOrderServiceConcurrentClient : virtual public ReverseOrderServiceIf {
 public:
  ReverseOrderServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
{
    setProtocol(prot);
  }
  ReverseOrderServiceConcurrentClient(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 myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth);
  int32_t send_myMethod(const std::string& first, const int16_t second, const int32_t third, const int64_t fourth);
  void recv_myMethod(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
