Update code to work with thrift 0.9.x.
authorMarc Burns <m4burns@uwaterloo.ca>
Mon, 19 Nov 2012 23:33:59 +0000 (18:33 -0500)
committerMarc Burns <m4burns@uwaterloo.ca>
Mon, 19 Nov 2012 23:33:59 +0000 (18:33 -0500)
database/Makefile
database/client.cpp
database/dump.cpp
database/gen-cpp/Pos.cpp
database/gen-cpp/Pos.h
database/gen-cpp/Pos_server.skeleton.cpp
database/gen-cpp/pos_constants.cpp
database/gen-cpp/pos_constants.h
database/gen-cpp/pos_types.cpp
database/gen-cpp/pos_types.h

index bfb9f40..8255767 100644 (file)
@@ -2,9 +2,9 @@
 \r
 CXX = @g++\r
 ifndef NDEBUG\r
-CXXFLAGS = -g -O0 -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp\r
+CXXFLAGS = -g -O0 -Wall -I/users/m4burns/thrift/include -I. -Igen-cpp\r
 else\r
-CXXFLAGS = -O3 -fexpensive-optimizations -ffast-math -fno-math-errno -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp\r
+CXXFLAGS = -O3 -fexpensive-optimizations -ffast-math -fno-math-errno -Wall -I/users/m4burns/thrift/include -I. -Igen-cpp\r
 endif\r
 LDFLAGS = /users/m4burns/thrift/lib/libthriftnb.a /users/m4burns/thrift/lib/libthrift.a -levent\r
 \r
index 62e0058..06167d6 100644 (file)
@@ -1,8 +1,8 @@
 #include <stdio.h>
 #include <unistd.h>
-#include <protocol/TBinaryProtocol.h>
-#include <transport/TSocket.h>
-#include <transport/TTransportUtils.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/transport/TSocket.h>
+#include <thrift/transport/TTransportUtils.h>
 #include "Pos.h"
 #include "sha1.h"
 #include <iostream>
index 592d690..3d66f8c 100644 (file)
@@ -1,8 +1,8 @@
 #include <stdio.h>
 #include <unistd.h>
-#include <protocol/TBinaryProtocol.h>
-#include <transport/TSocket.h>
-#include <transport/TTransportUtils.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/transport/TSocket.h>
+#include <thrift/transport/TTransportUtils.h>
 #include "Pos.h"
 #include "sha1.h"
 #include <iostream>
index c369839..b7afbfa 100644 (file)
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #include "Pos.h"
 
@@ -25,12 +26,7 @@ uint32_t Pos_ping_args::read(::apache::thrift::protocol::TProtocol* iprot) {
     if (ftype == ::apache::thrift::protocol::T_STOP) {
       break;
     }
-    switch (fid)
-    {
-      default:
-        xfer += iprot->skip(ftype);
-        break;
-    }
+    xfer += iprot->skip(ftype);
     xfer += iprot->readFieldEnd();
   }
 
@@ -42,6 +38,7 @@ uint32_t Pos_ping_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 uint32_t Pos_ping_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_ping_args");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -50,6 +47,7 @@ uint32_t Pos_ping_args::write(::apache::thrift::protocol::TProtocol* oprot) cons
 uint32_t Pos_ping_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_ping_pargs");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -73,12 +71,7 @@ uint32_t Pos_ping_result::read(::apache::thrift::protocol::TProtocol* iprot) {
     if (ftype == ::apache::thrift::protocol::T_STOP) {
       break;
     }
-    switch (fid)
-    {
-      default:
-        xfer += iprot->skip(ftype);
-        break;
-    }
+    xfer += iprot->skip(ftype);
     xfer += iprot->readFieldEnd();
   }
 
@@ -116,12 +109,7 @@ uint32_t Pos_ping_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
     if (ftype == ::apache::thrift::protocol::T_STOP) {
       break;
     }
-    switch (fid)
-    {
-      default:
-        xfer += iprot->skip(ftype);
-        break;
-    }
+    xfer += iprot->skip(ftype);
     xfer += iprot->readFieldEnd();
   }
 
@@ -148,12 +136,7 @@ uint32_t Pos_getSalt_args::read(::apache::thrift::protocol::TProtocol* iprot) {
     if (ftype == ::apache::thrift::protocol::T_STOP) {
       break;
     }
-    switch (fid)
-    {
-      default:
-        xfer += iprot->skip(ftype);
-        break;
-    }
+    xfer += iprot->skip(ftype);
     xfer += iprot->readFieldEnd();
   }
 
@@ -165,6 +148,7 @@ uint32_t Pos_getSalt_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 uint32_t Pos_getSalt_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getSalt_args");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -173,6 +157,7 @@ uint32_t Pos_getSalt_args::write(::apache::thrift::protocol::TProtocol* oprot) c
 uint32_t Pos_getSalt_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getSalt_pargs");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -317,9 +302,11 @@ uint32_t Pos_getAccountFromHash_args::read(::apache::thrift::protocol::TProtocol
 uint32_t Pos_getAccountFromHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getAccountFromHash_args");
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -328,9 +315,11 @@ uint32_t Pos_getAccountFromHash_args::write(::apache::thrift::protocol::TProtoco
 uint32_t Pos_getAccountFromHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getAccountFromHash_pargs");
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -475,9 +464,11 @@ uint32_t Pos_getHashesFromAccountId_args::read(::apache::thrift::protocol::TProt
 uint32_t Pos_getHashesFromAccountId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashesFromAccountId_args");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -486,9 +477,11 @@ uint32_t Pos_getHashesFromAccountId_args::write(::apache::thrift::protocol::TPro
 uint32_t Pos_getHashesFromAccountId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashesFromAccountId_pargs");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -520,14 +513,14 @@ uint32_t Pos_getHashesFromAccountId_result::read(::apache::thrift::protocol::TPr
             this->success.clear();
             uint32_t _size0;
             ::apache::thrift::protocol::TType _etype3;
-            iprot->readListBegin(_etype3, _size0);
+            xfer += iprot->readListBegin(_etype3, _size0);
             this->success.resize(_size0);
             uint32_t _i4;
             for (_i4 = 0; _i4 < _size0; ++_i4)
             {
               xfer += iprot->readString(this->success[_i4]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -596,14 +589,14 @@ uint32_t Pos_getHashesFromAccountId_presult::read(::apache::thrift::protocol::TP
             (*(this->success)).clear();
             uint32_t _size6;
             ::apache::thrift::protocol::TType _etype9;
-            iprot->readListBegin(_etype9, _size6);
+            xfer += iprot->readListBegin(_etype9, _size6);
             (*(this->success)).resize(_size6);
             uint32_t _i10;
             for (_i10 = 0; _i10 < _size6; ++_i10)
             {
               xfer += iprot->readString((*(this->success))[_i10]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -665,9 +658,11 @@ uint32_t Pos_getHashesFromAccountName_args::read(::apache::thrift::protocol::TPr
 uint32_t Pos_getHashesFromAccountName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashesFromAccountName_args");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -676,9 +671,11 @@ uint32_t Pos_getHashesFromAccountName_args::write(::apache::thrift::protocol::TP
 uint32_t Pos_getHashesFromAccountName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashesFromAccountName_pargs");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -710,14 +707,14 @@ uint32_t Pos_getHashesFromAccountName_result::read(::apache::thrift::protocol::T
             this->success.clear();
             uint32_t _size11;
             ::apache::thrift::protocol::TType _etype14;
-            iprot->readListBegin(_etype14, _size11);
+            xfer += iprot->readListBegin(_etype14, _size11);
             this->success.resize(_size11);
             uint32_t _i15;
             for (_i15 = 0; _i15 < _size11; ++_i15)
             {
               xfer += iprot->readString(this->success[_i15]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -786,14 +783,14 @@ uint32_t Pos_getHashesFromAccountName_presult::read(::apache::thrift::protocol::
             (*(this->success)).clear();
             uint32_t _size17;
             ::apache::thrift::protocol::TType _etype20;
-            iprot->readListBegin(_etype20, _size17);
+            xfer += iprot->readListBegin(_etype20, _size17);
             (*(this->success)).resize(_size17);
             uint32_t _i21;
             for (_i21 = 0; _i21 < _size17; ++_i21)
             {
               xfer += iprot->readString((*(this->success))[_i21]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -855,9 +852,11 @@ uint32_t Pos_getHashAccountBalance_args::read(::apache::thrift::protocol::TProto
 uint32_t Pos_getHashAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashAccountBalance_args");
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -866,9 +865,11 @@ uint32_t Pos_getHashAccountBalance_args::write(::apache::thrift::protocol::TProt
 uint32_t Pos_getHashAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getHashAccountBalance_pargs");
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1013,9 +1014,11 @@ uint32_t Pos_getIdAccountBalance_args::read(::apache::thrift::protocol::TProtoco
 uint32_t Pos_getIdAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getIdAccountBalance_args");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1024,9 +1027,11 @@ uint32_t Pos_getIdAccountBalance_args::write(::apache::thrift::protocol::TProtoc
 uint32_t Pos_getIdAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getIdAccountBalance_pargs");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1171,9 +1176,11 @@ uint32_t Pos_getNameAccountBalance_args::read(::apache::thrift::protocol::TProto
 uint32_t Pos_getNameAccountBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getNameAccountBalance_args");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1182,9 +1189,11 @@ uint32_t Pos_getNameAccountBalance_args::write(::apache::thrift::protocol::TProt
 uint32_t Pos_getNameAccountBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getNameAccountBalance_pargs");
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1345,15 +1354,19 @@ uint32_t Pos_associateHashWithId_args::read(::apache::thrift::protocol::TProtoco
 uint32_t Pos_associateHashWithId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_associateHashWithId_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1362,15 +1375,19 @@ uint32_t Pos_associateHashWithId_args::write(::apache::thrift::protocol::TProtoc
 uint32_t Pos_associateHashWithId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_associateHashWithId_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1531,15 +1548,19 @@ uint32_t Pos_associateHashWithName_args::read(::apache::thrift::protocol::TProto
 uint32_t Pos_associateHashWithName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_associateHashWithName_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 3);
   xfer += oprot->writeString(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1548,15 +1569,19 @@ uint32_t Pos_associateHashWithName_args::write(::apache::thrift::protocol::TProt
 uint32_t Pos_associateHashWithName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_associateHashWithName_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 3);
   xfer += oprot->writeString((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1709,12 +1734,15 @@ uint32_t Pos_deassociateHash_args::read(::apache::thrift::protocol::TProtocol* i
 uint32_t Pos_deassociateHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_deassociateHash_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1723,12 +1751,15 @@ uint32_t Pos_deassociateHash_args::write(::apache::thrift::protocol::TProtocol*
 uint32_t Pos_deassociateHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_deassociateHash_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1873,9 +1904,11 @@ uint32_t Pos_getUPCPrice_args::read(::apache::thrift::protocol::TProtocol* iprot
 uint32_t Pos_getUPCPrice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getUPCPrice_args");
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 1);
   xfer += oprot->writeI64(this->upc);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1884,9 +1917,11 @@ uint32_t Pos_getUPCPrice_args::write(::apache::thrift::protocol::TProtocol* opro
 uint32_t Pos_getUPCPrice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getUPCPrice_pargs");
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 1);
   xfer += oprot->writeI64((*(this->upc)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2047,15 +2082,19 @@ uint32_t Pos_setUPCPrice_args::read(::apache::thrift::protocol::TProtocol* iprot
 uint32_t Pos_setUPCPrice_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_setUPCPrice_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64(this->upc);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("price", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->price);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2064,15 +2103,19 @@ uint32_t Pos_setUPCPrice_args::write(::apache::thrift::protocol::TProtocol* opro
 uint32_t Pos_setUPCPrice_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_setUPCPrice_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64((*(this->upc)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("price", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->price)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2233,15 +2276,19 @@ uint32_t Pos_doTransactionOnHash_args::read(::apache::thrift::protocol::TProtoco
 uint32_t Pos_doTransactionOnHash_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnHash_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->dataToHash);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->delta);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2250,15 +2297,19 @@ uint32_t Pos_doTransactionOnHash_args::write(::apache::thrift::protocol::TProtoc
 uint32_t Pos_doTransactionOnHash_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnHash_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("dataToHash", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->dataToHash)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->delta)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2419,15 +2470,19 @@ uint32_t Pos_doTransactionOnId_args::read(::apache::thrift::protocol::TProtocol*
 uint32_t Pos_doTransactionOnId_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnId_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 2);
   xfer += oprot->writeI32(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->delta);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2436,15 +2491,19 @@ uint32_t Pos_doTransactionOnId_args::write(::apache::thrift::protocol::TProtocol
 uint32_t Pos_doTransactionOnId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnId_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_I32, 2);
   xfer += oprot->writeI32((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->delta)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2605,15 +2664,19 @@ uint32_t Pos_doTransactionOnName_args::read(::apache::thrift::protocol::TProtoco
 uint32_t Pos_doTransactionOnName_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnName_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->account);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->delta);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2622,15 +2685,19 @@ uint32_t Pos_doTransactionOnName_args::write(::apache::thrift::protocol::TProtoc
 uint32_t Pos_doTransactionOnName_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doTransactionOnName_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("account", ::apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString((*(this->account)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->delta)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2783,12 +2850,15 @@ uint32_t Pos_revertTransaction_args::read(::apache::thrift::protocol::TProtocol*
 uint32_t Pos_revertTransaction_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_revertTransaction_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("serial", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64(this->serial);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2797,12 +2867,15 @@ uint32_t Pos_revertTransaction_args::write(::apache::thrift::protocol::TProtocol
 uint32_t Pos_revertTransaction_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_revertTransaction_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("serial", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64((*(this->serial)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2947,9 +3020,11 @@ uint32_t Pos_getStock_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 uint32_t Pos_getStock_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getStock_args");
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 1);
   xfer += oprot->writeI64(this->upc);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -2958,9 +3033,11 @@ uint32_t Pos_getStock_args::write(::apache::thrift::protocol::TProtocol* oprot)
 uint32_t Pos_getStock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_getStock_pargs");
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 1);
   xfer += oprot->writeI64((*(this->upc)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -3121,15 +3198,19 @@ uint32_t Pos_doStockChange_args::read(::apache::thrift::protocol::TProtocol* ipr
 uint32_t Pos_doStockChange_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doStockChange_args");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->auth);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64(this->upc);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32(this->delta);
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -3138,15 +3219,19 @@ uint32_t Pos_doStockChange_args::write(::apache::thrift::protocol::TProtocol* op
 uint32_t Pos_doStockChange_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_doStockChange_pargs");
+
   xfer += oprot->writeFieldBegin("auth", ::apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString((*(this->auth)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("upc", ::apache::thrift::protocol::T_I64, 2);
   xfer += oprot->writeI64((*(this->upc)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldBegin("delta", ::apache::thrift::protocol::T_I32, 3);
   xfer += oprot->writeI32((*(this->delta)));
   xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -3266,12 +3351,7 @@ uint32_t Pos_toString_args::read(::apache::thrift::protocol::TProtocol* iprot) {
     if (ftype == ::apache::thrift::protocol::T_STOP) {
       break;
     }
-    switch (fid)
-    {
-      default:
-        xfer += iprot->skip(ftype);
-        break;
-    }
+    xfer += iprot->skip(ftype);
     xfer += iprot->readFieldEnd();
   }
 
@@ -3283,6 +3363,7 @@ uint32_t Pos_toString_args::read(::apache::thrift::protocol::TProtocol* iprot) {
 uint32_t Pos_toString_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_toString_args");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -3291,6 +3372,7 @@ uint32_t Pos_toString_args::write(::apache::thrift::protocol::TProtocol* oprot)
 uint32_t Pos_toString_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Pos_toString_pargs");
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -3322,14 +3404,14 @@ uint32_t Pos_toString_result::read(::apache::thrift::protocol::TProtocol* iprot)
             this->success.clear();
             uint32_t _size22;
             ::apache::thrift::protocol::TType _etype25;
-            iprot->readListBegin(_etype25, _size22);
+            xfer += iprot->readListBegin(_etype25, _size22);
             this->success.resize(_size22);
             uint32_t _i26;
             for (_i26 = 0; _i26 < _size22; ++_i26)
             {
               xfer += iprot->readString(this->success[_i26]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -3398,14 +3480,14 @@ uint32_t Pos_toString_presult::read(::apache::thrift::protocol::TProtocol* iprot
             (*(this->success)).clear();
             uint32_t _size28;
             ::apache::thrift::protocol::TType _etype31;
-            iprot->readListBegin(_etype31, _size28);
+            xfer += iprot->readListBegin(_etype31, _size28);
             (*(this->success)).resize(_size28);
             uint32_t _i32;
             for (_i32 = 0; _i32 < _size28; ++_i32)
             {
               xfer += iprot->readString((*(this->success))[_i32]);
             }
-            iprot->readListEnd();
+            xfer += iprot->readListEnd();
           }
           this->__isset.success = true;
         } else {
@@ -4592,34 +4674,8 @@ void PosClient::recv_toString(std::vector<std::string> & _return)
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "toString failed: unknown result");
 }
 
-bool PosProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) {
-
-  ::apache::thrift::protocol::TProtocol* iprot = piprot.get();
-  ::apache::thrift::protocol::TProtocol* oprot = poprot.get();
-  std::string fname;
-  ::apache::thrift::protocol::TMessageType mtype;
-  int32_t seqid;
-
-  iprot->readMessageBegin(fname, mtype, seqid);
-
-  if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) {
-    iprot->skip(::apache::thrift::protocol::T_STRUCT);
-    iprot->readMessageEnd();
-    iprot->getTransport()->readEnd();
-    ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
-    oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
-    x.write(oprot);
-    oprot->writeMessageEnd();
-    oprot->getTransport()->writeEnd();
-    oprot->getTransport()->flush();
-    return false;
-  }
-
-  return process_fn(iprot, oprot, fname, seqid, callContext);
-}
-
-bool PosProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) {
-  std::map<std::string, void (PosProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)>::iterator pfn;
+bool PosProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) {
+  ProcessMap::iterator pfn;
   pfn = processMap_.find(fname);
   if (pfn == processMap_.end()) {
     iprot->skip(::apache::thrift::protocol::T_STRUCT);
@@ -4631,7 +4687,7 @@ bool PosProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::ap
     oprot->writeMessageEnd();
     oprot->getTransport()->writeEnd();
     oprot->getTransport()->flush();
-    return false;
+    return true;
   }
   (this->*(pfn->second))(seqid, iprot, oprot, callContext);
   return true;
@@ -4640,13 +4696,13 @@ bool PosProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::ap
 void PosProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.ping", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.ping", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.ping");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.ping");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.ping");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.ping");
   }
 
   Pos_ping_args args;
@@ -4654,16 +4710,16 @@ void PosProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProt
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.ping", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.ping", bytes);
   }
 
   Pos_ping_result result;
   try {
     iface_->ping();
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.ping");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.ping");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4675,8 +4731,8 @@ void PosProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProt
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.ping");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.ping");
   }
 
   oprot->writeMessageBegin("ping", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4685,21 +4741,21 @@ void PosProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProt
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.ping", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.ping", bytes);
   }
 }
 
 void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getSalt", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getSalt", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getSalt");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getSalt");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getSalt");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getSalt");
   }
 
   Pos_getSalt_args args;
@@ -4707,8 +4763,8 @@ void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TP
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getSalt", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getSalt", bytes);
   }
 
   Pos_getSalt_result result;
@@ -4716,8 +4772,8 @@ void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TP
     iface_->getSalt(result.success);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getSalt");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getSalt");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4729,8 +4785,8 @@ void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TP
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getSalt");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getSalt");
   }
 
   oprot->writeMessageBegin("getSalt", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4739,21 +4795,21 @@ void PosProcessor::process_getSalt(int32_t seqid, ::apache::thrift::protocol::TP
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getSalt", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getSalt", bytes);
   }
 }
 
 void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getAccountFromHash", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getAccountFromHash", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getAccountFromHash");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getAccountFromHash");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getAccountFromHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getAccountFromHash");
   }
 
   Pos_getAccountFromHash_args args;
@@ -4761,8 +4817,8 @@ void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::p
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getAccountFromHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getAccountFromHash", bytes);
   }
 
   Pos_getAccountFromHash_result result;
@@ -4770,8 +4826,8 @@ void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::p
     result.success = iface_->getAccountFromHash(args.dataToHash);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getAccountFromHash");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getAccountFromHash");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4783,8 +4839,8 @@ void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::p
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getAccountFromHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getAccountFromHash");
   }
 
   oprot->writeMessageBegin("getAccountFromHash", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4793,21 +4849,21 @@ void PosProcessor::process_getAccountFromHash(int32_t seqid, ::apache::thrift::p
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getAccountFromHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getAccountFromHash", bytes);
   }
 }
 
 void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getHashesFromAccountId", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getHashesFromAccountId", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashesFromAccountId");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getHashesFromAccountId");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getHashesFromAccountId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getHashesFromAccountId");
   }
 
   Pos_getHashesFromAccountId_args args;
@@ -4815,8 +4871,8 @@ void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrif
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getHashesFromAccountId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getHashesFromAccountId", bytes);
   }
 
   Pos_getHashesFromAccountId_result result;
@@ -4824,8 +4880,8 @@ void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrif
     iface_->getHashesFromAccountId(result.success, args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountId");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountId");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4837,8 +4893,8 @@ void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrif
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountId");
   }
 
   oprot->writeMessageBegin("getHashesFromAccountId", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4847,21 +4903,21 @@ void PosProcessor::process_getHashesFromAccountId(int32_t seqid, ::apache::thrif
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountId", bytes);
   }
 }
 
 void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getHashesFromAccountName", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getHashesFromAccountName", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashesFromAccountName");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getHashesFromAccountName");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getHashesFromAccountName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getHashesFromAccountName");
   }
 
   Pos_getHashesFromAccountName_args args;
@@ -4869,8 +4925,8 @@ void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thr
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getHashesFromAccountName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getHashesFromAccountName", bytes);
   }
 
   Pos_getHashesFromAccountName_result result;
@@ -4878,8 +4934,8 @@ void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thr
     iface_->getHashesFromAccountName(result.success, args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountName");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getHashesFromAccountName");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4891,8 +4947,8 @@ void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thr
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getHashesFromAccountName");
   }
 
   oprot->writeMessageBegin("getHashesFromAccountName", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4901,21 +4957,21 @@ void PosProcessor::process_getHashesFromAccountName(int32_t seqid, ::apache::thr
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getHashesFromAccountName", bytes);
   }
 }
 
 void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getHashAccountBalance", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getHashAccountBalance", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getHashAccountBalance");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getHashAccountBalance");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getHashAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getHashAccountBalance");
   }
 
   Pos_getHashAccountBalance_args args;
@@ -4923,8 +4979,8 @@ void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getHashAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getHashAccountBalance", bytes);
   }
 
   Pos_getHashAccountBalance_result result;
@@ -4932,8 +4988,8 @@ void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift
     result.success = iface_->getHashAccountBalance(args.dataToHash);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getHashAccountBalance");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getHashAccountBalance");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4945,8 +5001,8 @@ void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getHashAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getHashAccountBalance");
   }
 
   oprot->writeMessageBegin("getHashAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -4955,21 +5011,21 @@ void PosProcessor::process_getHashAccountBalance(int32_t seqid, ::apache::thrift
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getHashAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getHashAccountBalance", bytes);
   }
 }
 
 void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getIdAccountBalance", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getIdAccountBalance", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getIdAccountBalance");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getIdAccountBalance");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getIdAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getIdAccountBalance");
   }
 
   Pos_getIdAccountBalance_args args;
@@ -4977,8 +5033,8 @@ void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getIdAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getIdAccountBalance", bytes);
   }
 
   Pos_getIdAccountBalance_result result;
@@ -4986,8 +5042,8 @@ void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::
     result.success = iface_->getIdAccountBalance(args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getIdAccountBalance");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getIdAccountBalance");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -4999,8 +5055,8 @@ void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getIdAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getIdAccountBalance");
   }
 
   oprot->writeMessageBegin("getIdAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5009,21 +5065,21 @@ void PosProcessor::process_getIdAccountBalance(int32_t seqid, ::apache::thrift::
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getIdAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getIdAccountBalance", bytes);
   }
 }
 
 void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getNameAccountBalance", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getNameAccountBalance", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getNameAccountBalance");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getNameAccountBalance");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getNameAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getNameAccountBalance");
   }
 
   Pos_getNameAccountBalance_args args;
@@ -5031,8 +5087,8 @@ void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getNameAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getNameAccountBalance", bytes);
   }
 
   Pos_getNameAccountBalance_result result;
@@ -5040,8 +5096,8 @@ void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift
     result.success = iface_->getNameAccountBalance(args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getNameAccountBalance");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getNameAccountBalance");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5053,8 +5109,8 @@ void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getNameAccountBalance");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getNameAccountBalance");
   }
 
   oprot->writeMessageBegin("getNameAccountBalance", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5063,21 +5119,21 @@ void PosProcessor::process_getNameAccountBalance(int32_t seqid, ::apache::thrift
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getNameAccountBalance", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getNameAccountBalance", bytes);
   }
 }
 
 void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.associateHashWithId", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.associateHashWithId", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.associateHashWithId");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.associateHashWithId");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.associateHashWithId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.associateHashWithId");
   }
 
   Pos_associateHashWithId_args args;
@@ -5085,8 +5141,8 @@ void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.associateHashWithId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.associateHashWithId", bytes);
   }
 
   Pos_associateHashWithId_result result;
@@ -5094,8 +5150,8 @@ void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::
     result.success = iface_->associateHashWithId(args.auth, args.dataToHash, args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.associateHashWithId");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.associateHashWithId");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5107,8 +5163,8 @@ void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.associateHashWithId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.associateHashWithId");
   }
 
   oprot->writeMessageBegin("associateHashWithId", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5117,21 +5173,21 @@ void PosProcessor::process_associateHashWithId(int32_t seqid, ::apache::thrift::
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.associateHashWithId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.associateHashWithId", bytes);
   }
 }
 
 void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.associateHashWithName", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.associateHashWithName", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.associateHashWithName");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.associateHashWithName");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.associateHashWithName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.associateHashWithName");
   }
 
   Pos_associateHashWithName_args args;
@@ -5139,8 +5195,8 @@ void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.associateHashWithName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.associateHashWithName", bytes);
   }
 
   Pos_associateHashWithName_result result;
@@ -5148,8 +5204,8 @@ void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift
     result.success = iface_->associateHashWithName(args.auth, args.dataToHash, args.account);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.associateHashWithName");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.associateHashWithName");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5161,8 +5217,8 @@ void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.associateHashWithName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.associateHashWithName");
   }
 
   oprot->writeMessageBegin("associateHashWithName", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5171,21 +5227,21 @@ void PosProcessor::process_associateHashWithName(int32_t seqid, ::apache::thrift
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.associateHashWithName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.associateHashWithName", bytes);
   }
 }
 
 void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.deassociateHash", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.deassociateHash", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.deassociateHash");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.deassociateHash");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.deassociateHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.deassociateHash");
   }
 
   Pos_deassociateHash_args args;
@@ -5193,8 +5249,8 @@ void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::prot
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.deassociateHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.deassociateHash", bytes);
   }
 
   Pos_deassociateHash_result result;
@@ -5202,8 +5258,8 @@ void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::prot
     result.success = iface_->deassociateHash(args.auth, args.dataToHash);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.deassociateHash");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.deassociateHash");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5215,8 +5271,8 @@ void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::prot
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.deassociateHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.deassociateHash");
   }
 
   oprot->writeMessageBegin("deassociateHash", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5225,21 +5281,21 @@ void PosProcessor::process_deassociateHash(int32_t seqid, ::apache::thrift::prot
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.deassociateHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.deassociateHash", bytes);
   }
 }
 
 void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getUPCPrice", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getUPCPrice", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getUPCPrice");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getUPCPrice");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getUPCPrice");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getUPCPrice");
   }
 
   Pos_getUPCPrice_args args;
@@ -5247,8 +5303,8 @@ void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getUPCPrice", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getUPCPrice", bytes);
   }
 
   Pos_getUPCPrice_result result;
@@ -5256,8 +5312,8 @@ void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol
     result.success = iface_->getUPCPrice(args.upc);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getUPCPrice");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getUPCPrice");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5269,8 +5325,8 @@ void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getUPCPrice");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getUPCPrice");
   }
 
   oprot->writeMessageBegin("getUPCPrice", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5279,21 +5335,21 @@ void PosProcessor::process_getUPCPrice(int32_t seqid, ::apache::thrift::protocol
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getUPCPrice", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getUPCPrice", bytes);
   }
 }
 
 void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.setUPCPrice", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.setUPCPrice", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.setUPCPrice");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.setUPCPrice");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.setUPCPrice");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.setUPCPrice");
   }
 
   Pos_setUPCPrice_args args;
@@ -5301,8 +5357,8 @@ void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.setUPCPrice", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.setUPCPrice", bytes);
   }
 
   Pos_setUPCPrice_result result;
@@ -5310,8 +5366,8 @@ void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol
     result.success = iface_->setUPCPrice(args.auth, args.upc, args.price);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.setUPCPrice");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.setUPCPrice");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5323,8 +5379,8 @@ void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.setUPCPrice");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.setUPCPrice");
   }
 
   oprot->writeMessageBegin("setUPCPrice", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5333,21 +5389,21 @@ void PosProcessor::process_setUPCPrice(int32_t seqid, ::apache::thrift::protocol
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.setUPCPrice", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.setUPCPrice", bytes);
   }
 }
 
 void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.doTransactionOnHash", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.doTransactionOnHash", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnHash");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.doTransactionOnHash");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.doTransactionOnHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.doTransactionOnHash");
   }
 
   Pos_doTransactionOnHash_args args;
@@ -5355,8 +5411,8 @@ void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.doTransactionOnHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.doTransactionOnHash", bytes);
   }
 
   Pos_doTransactionOnHash_result result;
@@ -5364,8 +5420,8 @@ void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::
     result.success = iface_->doTransactionOnHash(args.auth, args.dataToHash, args.delta);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.doTransactionOnHash");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.doTransactionOnHash");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5377,8 +5433,8 @@ void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.doTransactionOnHash");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.doTransactionOnHash");
   }
 
   oprot->writeMessageBegin("doTransactionOnHash", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5387,21 +5443,21 @@ void PosProcessor::process_doTransactionOnHash(int32_t seqid, ::apache::thrift::
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.doTransactionOnHash", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.doTransactionOnHash", bytes);
   }
 }
 
 void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.doTransactionOnId", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.doTransactionOnId", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnId");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.doTransactionOnId");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.doTransactionOnId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.doTransactionOnId");
   }
 
   Pos_doTransactionOnId_args args;
@@ -5409,8 +5465,8 @@ void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::pr
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.doTransactionOnId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.doTransactionOnId", bytes);
   }
 
   Pos_doTransactionOnId_result result;
@@ -5418,8 +5474,8 @@ void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::pr
     result.success = iface_->doTransactionOnId(args.auth, args.account, args.delta);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.doTransactionOnId");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.doTransactionOnId");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5431,8 +5487,8 @@ void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::pr
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.doTransactionOnId");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.doTransactionOnId");
   }
 
   oprot->writeMessageBegin("doTransactionOnId", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5441,21 +5497,21 @@ void PosProcessor::process_doTransactionOnId(int32_t seqid, ::apache::thrift::pr
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.doTransactionOnId", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.doTransactionOnId", bytes);
   }
 }
 
 void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.doTransactionOnName", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.doTransactionOnName", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doTransactionOnName");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.doTransactionOnName");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.doTransactionOnName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.doTransactionOnName");
   }
 
   Pos_doTransactionOnName_args args;
@@ -5463,8 +5519,8 @@ void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.doTransactionOnName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.doTransactionOnName", bytes);
   }
 
   Pos_doTransactionOnName_result result;
@@ -5472,8 +5528,8 @@ void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::
     result.success = iface_->doTransactionOnName(args.auth, args.account, args.delta);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.doTransactionOnName");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.doTransactionOnName");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5485,8 +5541,8 @@ void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.doTransactionOnName");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.doTransactionOnName");
   }
 
   oprot->writeMessageBegin("doTransactionOnName", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5495,21 +5551,21 @@ void PosProcessor::process_doTransactionOnName(int32_t seqid, ::apache::thrift::
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.doTransactionOnName", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.doTransactionOnName", bytes);
   }
 }
 
 void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.revertTransaction", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.revertTransaction", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.revertTransaction");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.revertTransaction");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.revertTransaction");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.revertTransaction");
   }
 
   Pos_revertTransaction_args args;
@@ -5517,8 +5573,8 @@ void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::pr
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.revertTransaction", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.revertTransaction", bytes);
   }
 
   Pos_revertTransaction_result result;
@@ -5526,8 +5582,8 @@ void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::pr
     result.success = iface_->revertTransaction(args.auth, args.serial);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.revertTransaction");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.revertTransaction");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5539,8 +5595,8 @@ void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::pr
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.revertTransaction");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.revertTransaction");
   }
 
   oprot->writeMessageBegin("revertTransaction", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5549,21 +5605,21 @@ void PosProcessor::process_revertTransaction(int32_t seqid, ::apache::thrift::pr
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.revertTransaction", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.revertTransaction", bytes);
   }
 }
 
 void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.getStock", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.getStock", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.getStock");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.getStock");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.getStock");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.getStock");
   }
 
   Pos_getStock_args args;
@@ -5571,8 +5627,8 @@ void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::T
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.getStock", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.getStock", bytes);
   }
 
   Pos_getStock_result result;
@@ -5580,8 +5636,8 @@ void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::T
     result.success = iface_->getStock(args.upc);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.getStock");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.getStock");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5593,8 +5649,8 @@ void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::T
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.getStock");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.getStock");
   }
 
   oprot->writeMessageBegin("getStock", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5603,21 +5659,21 @@ void PosProcessor::process_getStock(int32_t seqid, ::apache::thrift::protocol::T
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.getStock", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.getStock", bytes);
   }
 }
 
 void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.doStockChange", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.doStockChange", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.doStockChange");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.doStockChange");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.doStockChange");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.doStockChange");
   }
 
   Pos_doStockChange_args args;
@@ -5625,8 +5681,8 @@ void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protoc
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.doStockChange", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.doStockChange", bytes);
   }
 
   Pos_doStockChange_result result;
@@ -5634,8 +5690,8 @@ void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protoc
     result.success = iface_->doStockChange(args.auth, args.upc, args.delta);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.doStockChange");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.doStockChange");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5647,8 +5703,8 @@ void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protoc
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.doStockChange");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.doStockChange");
   }
 
   oprot->writeMessageBegin("doStockChange", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5657,21 +5713,21 @@ void PosProcessor::process_doStockChange(int32_t seqid, ::apache::thrift::protoc
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.doStockChange", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.doStockChange", bytes);
   }
 }
 
 void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
-  if (eventHandler_.get() != NULL) {
-    ctx = eventHandler_->getContext("Pos.toString", callContext);
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("Pos.toString", callContext);
   }
-  ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "Pos.toString");
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Pos.toString");
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preRead(ctx, "Pos.toString");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "Pos.toString");
   }
 
   Pos_toString_args args;
@@ -5679,8 +5735,8 @@ void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::T
   iprot->readMessageEnd();
   uint32_t bytes = iprot->getTransport()->readEnd();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postRead(ctx, "Pos.toString", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "Pos.toString", bytes);
   }
 
   Pos_toString_result result;
@@ -5688,8 +5744,8 @@ void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::T
     iface_->toString(result.success);
     result.__isset.success = true;
   } catch (const std::exception& e) {
-    if (eventHandler_.get() != NULL) {
-      eventHandler_->handlerError(ctx, "Pos.toString");
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "Pos.toString");
     }
 
     ::apache::thrift::TApplicationException x(e.what());
@@ -5701,8 +5757,8 @@ void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::T
     return;
   }
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->preWrite(ctx, "Pos.toString");
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "Pos.toString");
   }
 
   oprot->writeMessageBegin("toString", ::apache::thrift::protocol::T_REPLY, seqid);
@@ -5711,10 +5767,16 @@ void PosProcessor::process_toString(int32_t seqid, ::apache::thrift::protocol::T
   bytes = oprot->getTransport()->writeEnd();
   oprot->getTransport()->flush();
 
-  if (eventHandler_.get() != NULL) {
-    eventHandler_->postWrite(ctx, "Pos.toString", bytes);
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "Pos.toString", bytes);
   }
 }
 
+::boost::shared_ptr< ::apache::thrift::TProcessor > PosProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) {
+  ::apache::thrift::ReleaseHandler< PosIfFactory > cleanup(handlerFactory_);
+  ::boost::shared_ptr< PosIf > handler(handlerFactory_->getHandler(connInfo), cleanup);
+  ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new PosProcessor(handler));
+  return processor;
+}
 } // namespace
 
index e5ed929..9660b34 100644 (file)
@@ -1,12 +1,13 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #ifndef Pos_H
 #define Pos_H
 
-#include <TProcessor.h>
+#include <thrift/TDispatchProcessor.h>
 #include "pos_types.h"
 
 namespace pos {
@@ -36,6 +37,30 @@ class PosIf {
   virtual void toString(std::vector<std::string> & _return) = 0;
 };
 
+class PosIfFactory {
+ public:
+  typedef PosIf Handler;
+
+  virtual ~PosIfFactory() {}
+
+  virtual PosIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
+  virtual void releaseHandler(PosIf* /* handler */) = 0;
+};
+
+class PosIfSingletonFactory : virtual public PosIfFactory {
+ public:
+  PosIfSingletonFactory(const boost::shared_ptr<PosIf>& iface) : iface_(iface) {}
+  virtual ~PosIfSingletonFactory() {}
+
+  virtual PosIf* getHandler(const ::apache::thrift::TConnectionInfo&) {
+    return iface_.get();
+  }
+  virtual void releaseHandler(PosIf* /* handler */) {}
+
+ protected:
+  boost::shared_ptr<PosIf> iface_;
+};
+
 class PosNull : virtual public PosIf {
  public:
   virtual ~PosNull() {}
@@ -235,7 +260,7 @@ typedef struct _Pos_getSalt_result__isset {
 class Pos_getSalt_result {
  public:
 
-  Pos_getSalt_result() : success("") {
+  Pos_getSalt_result() : success() {
   }
 
   virtual ~Pos_getSalt_result() throw() {}
@@ -292,7 +317,7 @@ typedef struct _Pos_getAccountFromHash_args__isset {
 class Pos_getAccountFromHash_args {
  public:
 
-  Pos_getAccountFromHash_args() : dataToHash("") {
+  Pos_getAccountFromHash_args() : dataToHash() {
   }
 
   virtual ~Pos_getAccountFromHash_args() throw() {}
@@ -508,7 +533,7 @@ typedef struct _Pos_getHashesFromAccountName_args__isset {
 class Pos_getHashesFromAccountName_args {
  public:
 
-  Pos_getHashesFromAccountName_args() : account("") {
+  Pos_getHashesFromAccountName_args() : account() {
   }
 
   virtual ~Pos_getHashesFromAccountName_args() throw() {}
@@ -616,7 +641,7 @@ typedef struct _Pos_getHashAccountBalance_args__isset {
 class Pos_getHashAccountBalance_args {
  public:
 
-  Pos_getHashAccountBalance_args() : dataToHash("") {
+  Pos_getHashAccountBalance_args() : dataToHash() {
   }
 
   virtual ~Pos_getHashAccountBalance_args() throw() {}
@@ -832,7 +857,7 @@ typedef struct _Pos_getNameAccountBalance_args__isset {
 class Pos_getNameAccountBalance_args {
  public:
 
-  Pos_getNameAccountBalance_args() : account("") {
+  Pos_getNameAccountBalance_args() : account() {
   }
 
   virtual ~Pos_getNameAccountBalance_args() throw() {}
@@ -942,7 +967,7 @@ typedef struct _Pos_associateHashWithId_args__isset {
 class Pos_associateHashWithId_args {
  public:
 
-  Pos_associateHashWithId_args() : auth(""), dataToHash(""), account(0) {
+  Pos_associateHashWithId_args() : auth(), dataToHash(), account(0) {
   }
 
   virtual ~Pos_associateHashWithId_args() throw() {}
@@ -1068,7 +1093,7 @@ typedef struct _Pos_associateHashWithName_args__isset {
 class Pos_associateHashWithName_args {
  public:
 
-  Pos_associateHashWithName_args() : auth(""), dataToHash(""), account("") {
+  Pos_associateHashWithName_args() : auth(), dataToHash(), account() {
   }
 
   virtual ~Pos_associateHashWithName_args() throw() {}
@@ -1193,7 +1218,7 @@ typedef struct _Pos_deassociateHash_args__isset {
 class Pos_deassociateHash_args {
  public:
 
-  Pos_deassociateHash_args() : auth(""), dataToHash("") {
+  Pos_deassociateHash_args() : auth(), dataToHash() {
   }
 
   virtual ~Pos_deassociateHash_args() throw() {}
@@ -1419,7 +1444,7 @@ typedef struct _Pos_setUPCPrice_args__isset {
 class Pos_setUPCPrice_args {
  public:
 
-  Pos_setUPCPrice_args() : auth(""), upc(0), price(0) {
+  Pos_setUPCPrice_args() : auth(), upc(0), price(0) {
   }
 
   virtual ~Pos_setUPCPrice_args() throw() {}
@@ -1545,7 +1570,7 @@ typedef struct _Pos_doTransactionOnHash_args__isset {
 class Pos_doTransactionOnHash_args {
  public:
 
-  Pos_doTransactionOnHash_args() : auth(""), dataToHash(""), delta(0) {
+  Pos_doTransactionOnHash_args() : auth(), dataToHash(), delta(0) {
   }
 
   virtual ~Pos_doTransactionOnHash_args() throw() {}
@@ -1671,7 +1696,7 @@ typedef struct _Pos_doTransactionOnId_args__isset {
 class Pos_doTransactionOnId_args {
  public:
 
-  Pos_doTransactionOnId_args() : auth(""), account(0), delta(0) {
+  Pos_doTransactionOnId_args() : auth(), account(0), delta(0) {
   }
 
   virtual ~Pos_doTransactionOnId_args() throw() {}
@@ -1797,7 +1822,7 @@ typedef struct _Pos_doTransactionOnName_args__isset {
 class Pos_doTransactionOnName_args {
  public:
 
-  Pos_doTransactionOnName_args() : auth(""), account(""), delta(0) {
+  Pos_doTransactionOnName_args() : auth(), account(), delta(0) {
   }
 
   virtual ~Pos_doTransactionOnName_args() throw() {}
@@ -1922,7 +1947,7 @@ typedef struct _Pos_revertTransaction_args__isset {
 class Pos_revertTransaction_args {
  public:
 
-  Pos_revertTransaction_args() : auth(""), serial(0) {
+  Pos_revertTransaction_args() : auth(), serial(0) {
   }
 
   virtual ~Pos_revertTransaction_args() throw() {}
@@ -2148,7 +2173,7 @@ typedef struct _Pos_doStockChange_args__isset {
 class Pos_doStockChange_args {
  public:
 
-  Pos_doStockChange_args() : auth(""), upc(0), delta(0) {
+  Pos_doStockChange_args() : auth(), upc(0), delta(0) {
   }
 
   virtual ~Pos_doStockChange_args() throw() {}
@@ -2445,12 +2470,14 @@ class PosClient : virtual public PosIf {
   ::apache::thrift::protocol::TProtocol* oprot_;
 };
 
-class PosProcessor : virtual public ::apache::thrift::TProcessor {
+class PosProcessor : public ::apache::thrift::TDispatchProcessor {
  protected:
   boost::shared_ptr<PosIf> iface_;
-  virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext);
+  virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext);
  private:
-  std::map<std::string, void (PosProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)> processMap_;
+  typedef  void (PosProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
+  typedef std::map<std::string, ProcessFunction> ProcessMap;
+  ProcessMap processMap_;
   void process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getSalt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_getAccountFromHash(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -2496,10 +2523,20 @@ class PosProcessor : virtual public ::apache::thrift::TProcessor {
     processMap_["toString"] = &PosProcessor::process_toString;
   }
 
-  virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext);
   virtual ~PosProcessor() {}
 };
 
+class PosProcessorFactory : public ::apache::thrift::TProcessorFactory {
+ public:
+  PosProcessorFactory(const ::boost::shared_ptr< PosIfFactory >& handlerFactory) :
+      handlerFactory_(handlerFactory) {}
+
+  ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo);
+
+ protected:
+  ::boost::shared_ptr< PosIfFactory > handlerFactory_;
+};
+
 class PosMultiface : virtual public PosIf {
  public:
   PosMultiface(std::vector<boost::shared_ptr<PosIf> >& ifaces) : ifaces_(ifaces) {
@@ -2514,222 +2551,186 @@ class PosMultiface : virtual public PosIf {
  public:
   void ping() {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
       ifaces_[i]->ping();
     }
+    ifaces_[i]->ping();
   }
 
   void getSalt(std::string& _return) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        ifaces_[i]->getSalt(_return);
-        return;
-      } else {
-        ifaces_[i]->getSalt(_return);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getSalt(_return);
     }
+    ifaces_[i]->getSalt(_return);
+    return;
   }
 
   int32_t getAccountFromHash(const std::string& dataToHash) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getAccountFromHash(dataToHash);
-      } else {
-        ifaces_[i]->getAccountFromHash(dataToHash);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getAccountFromHash(dataToHash);
     }
+    return ifaces_[i]->getAccountFromHash(dataToHash);
   }
 
   void getHashesFromAccountId(std::vector<std::string> & _return, const int32_t account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        ifaces_[i]->getHashesFromAccountId(_return, account);
-        return;
-      } else {
-        ifaces_[i]->getHashesFromAccountId(_return, account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getHashesFromAccountId(_return, account);
     }
+    ifaces_[i]->getHashesFromAccountId(_return, account);
+    return;
   }
 
   void getHashesFromAccountName(std::vector<std::string> & _return, const std::string& account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        ifaces_[i]->getHashesFromAccountName(_return, account);
-        return;
-      } else {
-        ifaces_[i]->getHashesFromAccountName(_return, account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getHashesFromAccountName(_return, account);
     }
+    ifaces_[i]->getHashesFromAccountName(_return, account);
+    return;
   }
 
   int32_t getHashAccountBalance(const std::string& dataToHash) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getHashAccountBalance(dataToHash);
-      } else {
-        ifaces_[i]->getHashAccountBalance(dataToHash);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getHashAccountBalance(dataToHash);
     }
+    return ifaces_[i]->getHashAccountBalance(dataToHash);
   }
 
   int32_t getIdAccountBalance(const int32_t account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getIdAccountBalance(account);
-      } else {
-        ifaces_[i]->getIdAccountBalance(account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getIdAccountBalance(account);
     }
+    return ifaces_[i]->getIdAccountBalance(account);
   }
 
   int32_t getNameAccountBalance(const std::string& account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getNameAccountBalance(account);
-      } else {
-        ifaces_[i]->getNameAccountBalance(account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getNameAccountBalance(account);
     }
+    return ifaces_[i]->getNameAccountBalance(account);
   }
 
   int64_t associateHashWithId(const std::string& auth, const std::string& dataToHash, const int32_t account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->associateHashWithId(auth, dataToHash, account);
-      } else {
-        ifaces_[i]->associateHashWithId(auth, dataToHash, account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->associateHashWithId(auth, dataToHash, account);
     }
+    return ifaces_[i]->associateHashWithId(auth, dataToHash, account);
   }
 
   int64_t associateHashWithName(const std::string& auth, const std::string& dataToHash, const std::string& account) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->associateHashWithName(auth, dataToHash, account);
-      } else {
-        ifaces_[i]->associateHashWithName(auth, dataToHash, account);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->associateHashWithName(auth, dataToHash, account);
     }
+    return ifaces_[i]->associateHashWithName(auth, dataToHash, account);
   }
 
   int64_t deassociateHash(const std::string& auth, const std::string& dataToHash) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->deassociateHash(auth, dataToHash);
-      } else {
-        ifaces_[i]->deassociateHash(auth, dataToHash);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->deassociateHash(auth, dataToHash);
     }
+    return ifaces_[i]->deassociateHash(auth, dataToHash);
   }
 
   int32_t getUPCPrice(const int64_t upc) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getUPCPrice(upc);
-      } else {
-        ifaces_[i]->getUPCPrice(upc);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getUPCPrice(upc);
     }
+    return ifaces_[i]->getUPCPrice(upc);
   }
 
   int64_t setUPCPrice(const std::string& auth, const int64_t upc, const int32_t price) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->setUPCPrice(auth, upc, price);
-      } else {
-        ifaces_[i]->setUPCPrice(auth, upc, price);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->setUPCPrice(auth, upc, price);
     }
+    return ifaces_[i]->setUPCPrice(auth, upc, price);
   }
 
   int64_t doTransactionOnHash(const std::string& auth, const std::string& dataToHash, const int32_t delta) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
-      } else {
-        ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
     }
+    return ifaces_[i]->doTransactionOnHash(auth, dataToHash, delta);
   }
 
   int64_t doTransactionOnId(const std::string& auth, const int32_t account, const int32_t delta) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->doTransactionOnId(auth, account, delta);
-      } else {
-        ifaces_[i]->doTransactionOnId(auth, account, delta);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->doTransactionOnId(auth, account, delta);
     }
+    return ifaces_[i]->doTransactionOnId(auth, account, delta);
   }
 
   int64_t doTransactionOnName(const std::string& auth, const std::string& account, const int32_t delta) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->doTransactionOnName(auth, account, delta);
-      } else {
-        ifaces_[i]->doTransactionOnName(auth, account, delta);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->doTransactionOnName(auth, account, delta);
     }
+    return ifaces_[i]->doTransactionOnName(auth, account, delta);
   }
 
   int64_t revertTransaction(const std::string& auth, const int64_t serial) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->revertTransaction(auth, serial);
-      } else {
-        ifaces_[i]->revertTransaction(auth, serial);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->revertTransaction(auth, serial);
     }
+    return ifaces_[i]->revertTransaction(auth, serial);
   }
 
   int32_t getStock(const int64_t upc) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->getStock(upc);
-      } else {
-        ifaces_[i]->getStock(upc);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->getStock(upc);
     }
+    return ifaces_[i]->getStock(upc);
   }
 
   int64_t doStockChange(const std::string& auth, const int64_t upc, const int32_t delta) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        return ifaces_[i]->doStockChange(auth, upc, delta);
-      } else {
-        ifaces_[i]->doStockChange(auth, upc, delta);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->doStockChange(auth, upc, delta);
     }
+    return ifaces_[i]->doStockChange(auth, upc, delta);
   }
 
   void toString(std::vector<std::string> & _return) {
     size_t sz = ifaces_.size();
-    for (size_t i = 0; i < sz; ++i) {
-      if (i == sz - 1) {
-        ifaces_[i]->toString(_return);
-        return;
-      } else {
-        ifaces_[i]->toString(_return);
-      }
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->toString(_return);
     }
+    ifaces_[i]->toString(_return);
+    return;
   }
 
 };
index 5ebceba..05dbc46 100644 (file)
@@ -1,11 +1,13 @@
 // This autogenerated skeleton file illustrates how to build a server.
 // You should copy it to another filename to avoid overwriting it.
 
+#include <stdint.h>
 #include "Pos.h"
-#include <protocol/TBinaryProtocol.h>
-#include <server/TNonblockingServer.h>
-#include <transport/TServerSocket.h>
-#include <transport/TBufferTransports.h>
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/server/TSimpleServer.h>
+#include <thrift/server/TNonblockingServer.h>
+#include <thrift/transport/TServerSocket.h>
+#include <thrift/transport/TBufferTransports.h>
 #include <iostream>
 #include "db_if.h"
 #include "posdb.h"
@@ -18,7 +20,7 @@ using namespace ::apache::thrift::server;
 
 using boost::shared_ptr;
 
-using namespace pos;
+using namespace ::pos;
 
 DbIf * d;
 
index de1c36d..8923d1c 100644 (file)
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #include "pos_constants.h"
 
index d263c6e..bde0d07 100644 (file)
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #ifndef pos_CONSTANTS_H
 #define pos_CONSTANTS_H
index 8bd73b0..11cda21 100644 (file)
@@ -1,10 +1,13 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #include "pos_types.h"
 
+#include <algorithm>
+
 namespace pos {
 
 } // namespace
index 4a4de6f..c8cc6f6 100644 (file)
@@ -1,17 +1,17 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 #ifndef pos_TYPES_H
 #define pos_TYPES_H
 
-#include <Thrift.h>
-#include <TApplicationException.h>
-#include <protocol/TProtocol.h>
-#include <transport/TTransport.h>
-
-
+#include <stdint.h>
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
 
 namespace pos {