// This autogenerated skeleton file illustrates how to build a server.
// You should copy it to another filename to avoid overwriting it.

#include "ParentService.h"
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TSimpleServer.h>
#include <thrift/transport/TServerSocket.h>
#include <thrift/transport/TBufferTransports.h>

using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;

using namespace  ::apache::thrift::test;

class ParentServiceHandler : virtual public ParentServiceIf {
 public:
  ParentServiceHandler() {
    // Your initialization goes here
  }

  int32_t incrementGeneration() {
    // Your implementation goes here
    printf("incrementGeneration\n");
  }

  int32_t getGeneration() {
    // Your implementation goes here
    printf("getGeneration\n");
  }

  void addString(const std::string& s) {
    // Your implementation goes here
    printf("addString\n");
  }

  void getStrings(std::vector<std::string> & _return) {
    // Your implementation goes here
    printf("getStrings\n");
  }

  void getDataWait(std::string& _return, const int32_t length) {
    // Your implementation goes here
    printf("getDataWait\n");
  }

  void onewayWait() {
    // Your implementation goes here
    printf("onewayWait\n");
  }

  void exceptionWait(const std::string& message) {
    // Your implementation goes here
    printf("exceptionWait\n");
  }

  void unexpectedExceptionWait(const std::string& message) {
    // Your implementation goes here
    printf("unexpectedExceptionWait\n");
  }

};

int main(int argc, char **argv) {
  int port = 9090;
  ::std::shared_ptr<ParentServiceHandler> handler(new ParentServiceHandler());
  ::std::shared_ptr<TProcessor> processor(new ParentServiceProcessor(handler));
  ::std::shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
  ::std::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
  ::std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());

  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
  server.serve();
  return 0;
}

