Cleaning up drivers/Cpp, Cpp/Lifxtest, virtuals, and iotrmi/C++ (revisiting the C...
[iot2.git] / iotjava / iotrmi / C++ / IoTRMIComm.hpp
index 9f45c60695e68c3e0e88f025980ef24536acc83c..7d1502b929c0777962838744d2d588474317602f 100644 (file)
@@ -39,42 +39,42 @@ class IoTRMIComm {
                // Public methods
                virtual void            sendReturnObj(void* retObj, string type, char* methodBytes) = 0;
                virtual void            sendReturnObj(void* retObj[], string type[], int numRet, char* methodBytes) = 0;
-               int                                     returnLength(void* retObj[], string retCls[], int numRet);
-               char*                           returnToBytes(void* retObj[], string retCls[], char* retBytes, int numRet);
-               char*                           getMethodBytes();
-               int                                     getMethodLength();
-               int                                     getObjectIdFromMethod();
-               static int                      getObjectId(char* packetBytes);
-               static int                      getMethodId(char* packetBytes);
-               static int                      getPacketType(char* packetBytes);
-               void**                          getMethodParams(string paramCls[], int numParam, void* paramObj[], char* methodBytes);
-               void                            registerSkeleton(int objectId, bool* methodReceived);
-               void                            registerStub(int objectId, int methodId, bool* retValueReceived);
-               int                                     getObjectIdCounter();
-               void                            setObjectIdCounter(int objIdCounter);
-               void                            decrementObjectIdCounter();
-
-               int                                     methodLength(string paramCls[], void* paramObj[], int numParam);
-               char*                           methodToBytes(int objectId, int methId, string paramCls[], void* paramObj[],
-                                                               char* method, int numParam);
+               int                     returnLength(void* retObj[], string retCls[], int numRet);
+               char*                   returnToBytes(void* retObj[], string retCls[], char* retBytes, int numRet);
+               char*                   getMethodBytes();
+               int                     getMethodLength();
+               int                     getObjectIdFromMethod();
+               static int              getObjectId(char* packetBytes);
+               static int              getMethodId(char* packetBytes);
+               static int              getPacketType(char* packetBytes);
+               void**                  getMethodParams(string paramCls[], int numParam, void* paramObj[], char* methodBytes);
+               void                    registerSkeleton(int objectId, bool* methodReceived);
+               void                    registerStub(int objectId, int methodId, bool* retValueReceived);
+               int                     getObjectIdCounter();
+               void                    setObjectIdCounter(int objIdCounter);
+               void                    decrementObjectIdCounter();
+
+               int                     methodLength(string paramCls[], void* paramObj[], int numParam);
+               char*                   methodToBytes(int objectId, int methId, string paramCls[], void* paramObj[],
+                                               char* method, int numParam);
                virtual void            remoteCall(int objectId, int methodId, string paramCls[], 
-                                                               void* paramObj[], int numParam) = 0;
-               void*                           getReturnValue(string retType, void* retObj);
+                                               void* paramObj[], int numParam) = 0;
+               void*                   getReturnValue(string retType, void* retObj);
                
-               void**                          getStructObjects(string retType[], int numRet, void* retObj[]);
-               void**                          getReturnObjects(char* retBytes, string retCls[], int numRet, void* retObj[]);
+               void**                  getStructObjects(string retType[], int numRet, void* retObj[]);
+               void**                  getReturnObjects(char* retBytes, string retCls[], int numRet, void* retObj[]);
 
        protected:
-               IoTRMIUtil                                      *rmiUtil;
-               char*                                           methodBytes;
-               int                                                     methodLen;
-               char*                                           retValueBytes;
-               int                                                     retValueLen;
+               IoTRMIUtil                      *rmiUtil;
+               char*                           methodBytes;
+               int                             methodLen;
+               char*                           retValueBytes;
+               int                             retValueLen;
                ConcurrentLinkedListQueue       methodQueue;
                ConcurrentLinkedListQueue       returnQueue;
-               map<int,bool*>                          mapSkeletonId;
-               map<string,bool*>                       mapStubId;
-               int                                                     objectIdCounter = std::numeric_limits<int>::max();
+               map<int,bool*>                  mapSkeletonId;
+               map<string,bool*>               mapStubId;
+               int                             objectIdCounter = std::numeric_limits<int>::max();
 
        private:
                // Private methods
@@ -113,7 +113,6 @@ IoTRMIComm::~IoTRMIComm() {
 void IoTRMIComm::wakeUpThreadOnMethodCall(IoTRMIComm* rmiComm) {
 
        int methLen = 0;
-       //cout << "Starting wakeUpThreadOnMethodCall()" << endl;
        while(true) {
                // Convert back to char*
                char* queueHead = rmiComm->methodQueue.deQAndGetLength(&methLen);
@@ -135,7 +134,6 @@ void IoTRMIComm::wakeUpThreadOnMethodCall(IoTRMIComm* rmiComm) {
 void IoTRMIComm::wakeUpThreadOnReturnValue(IoTRMIComm* rmiComm) {
 
        int retLen = 0;
-       //cout << "Starting wakeUpThreadOnReturnValue()" << endl;
        while(true) {
                // Convert back to char*
                char* queueHead = rmiComm->returnQueue.deQAndGetLength(&retLen);