Making C++ classes final
[iot2.git] / iotjava / iotruntime / cpp / iotslave / IoTSlave.hpp
index e5ecdfc7e4bf225f94247faa15bf202cdf53a07c..99d21891395329bb916d98a3310c22d959d371d7 100644 (file)
@@ -26,6 +26,7 @@
 enum IoTCommCode {
 
        ACKNOWLEDGED,
+       CREATE_DRIVER_OBJECT,
        CREATE_OBJECT,
        CREATE_MAIN_OBJECT,
        CREATE_NEW_IOTSET,
@@ -42,7 +43,7 @@ enum IoTCommCode {
        REINITIALIZE_IOTSET_FIELD,
        REINITIALIZE_IOTRELATION_FIELD,
        TRANSFER_FILE,
-
+       
 };
 
 
@@ -53,13 +54,13 @@ typedef void destroy_t(void*);
 typedef void init_t(void*);
 
 
-class IoTSlave {
+class IoTSlave final {
 
        private:
                // Constants
                const static int RCVBUFSIZE = 1024;                     // Size of receive buffer
                const static int SKELPARAMSIZE = 3;                     // Number of params for skeleton
-               const static int STUBPARAMSIZE = 6;                     // Number of params for stub
+               const static int STUBPARAMSIZE = 5;                     // Number of params for stub
                const static string FILEPATH;                           // File path
                const static string FILEEXT;                            // File extension
                const static string SOEXT;                              // Shared object (.so) extension
@@ -83,7 +84,6 @@ class IoTSlave {
                string objectStubClass;         // Need to send from Java IoTSlave: sMessage.getObjectStubInterfaceName() + STUB_CLASS_SUFFIX
                int objectRegPort;
                int objectStubPort;
-               vector<int> ports;                      // Now used to contain callback ports
                string objectFieldName;                                         // Field name that is going to be initialized with IoTSet or IoTRelation
                unordered_set<void*>* isetObject;                       // Set of object
                IoTSet<void*>* iotsetObject;                            // IoTSet of object
@@ -98,7 +98,7 @@ class IoTSlave {
                ofstream log;                                           // Log the messages
                vector<string> args;                            // Hold the arguments for constructor (in string format)
                vector<string> argClasses;                      // Hold the argument classes
-               bool isDriverObject;                            // Set to true if this is IoTSlave instance for a driver object
+               //bool isDriverObject;                          // Set to true if this is IoTSlave instance for a driver object
                void* objMainCls;                                       // Main class handler, i.e. driver or controller object
                void* objSkelCls;                                       // Skeleton handler
                void* objStubCls;                                       // Stub handler
@@ -137,6 +137,7 @@ class IoTSlave {
                void reinitializeIoTRelationField();
                void getIoTSetObject();
                void invokeInitMethod();
+               void createDriverObject();
                void transferFile();
 
        private: