Change c style to cpp style handle management
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 27 Sep 2021 23:40:26 +0000 (08:40 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 28 Oct 2021 10:24:38 +0000 (19:24 +0900)
[Problem] C Style structure inheritance is implemented
[Solution] Use the class/struct inheritance

Change-Id: Ie9de53845f527360944a621030a32e019886be53
Signed-off-by: Sung-jae Park <nicesj.park@samsung.com>
subprojects/libbeyond-generic-capi/src/authenticator_capi.cc
subprojects/libbeyond-generic-capi/src/inference_capi.cc
subprojects/libbeyond-generic-capi/src/inference_peer_capi.cc
subprojects/libbeyond-generic-capi/src/inference_runtime_capi.cc
subprojects/libbeyond-tizen-capi/src/authenticator_capi.cc
subprojects/libbeyond-tizen-capi/src/discovery_capi.cc
subprojects/libbeyond-tizen-capi/src/inference_capi.cc
subprojects/libbeyond-tizen-capi/src/inference_peer_capi.cc
subprojects/libbeyond-tizen-capi/src/inference_runtime_capi.cc

index 1dee707cf18fcfd43c00c71098f5371d35a0be28..a0dfe38c6887c04f9d0ea018a2768f04dc882ac7 100644 (file)
@@ -29,8 +29,7 @@
 #include "authenticator_internal.h"
 #include "beyond_generic_internal.h"
 
-struct beyond_authenticator {
-    beyond_generic_handle _generic;
+struct beyond_authenticator : public beyond_generic_handle {
     beyond::EventLoop *eventLoop;
     beyond::EventLoop::HandlerObject *handlerObject;
 
index 924f38cc58d7b91e3c69e2f11bb8daf267688f3e..5e55c74af54b3f9ecfbbb8dd4f9942fd35b1b2de 100644 (file)
@@ -35,8 +35,7 @@
 #include "inference_runtime_internal.h"
 #include "beyond_generic_internal.h"
 
-struct beyond_inference {
-    beyond_generic_handle _generic;
+struct beyond_inference : public beyond_generic_handle {
     beyond::EventLoop *eventLoop;
     beyond::EventLoop::HandlerObject *handlerObject;
 
index 31d88ac65eee25bbcb699832faf80c5eb5255dd4..b6a150f8388de88bb3ad7f3f3f15dff646d258a9 100644 (file)
@@ -34,8 +34,7 @@
 #include "authenticator_internal.h"
 #include "beyond_generic_internal.h"
 
-struct beyond_inference_peer {
-    beyond_generic_handle _generic;
+struct beyond_inference_peer : public beyond_generic_handle {
     beyond::EventLoop *eventLoop;
     beyond::EventLoop::HandlerObject *handlerObject;
 
index f1b82056c37943e33599a409f11bcdc95d34e50e..4e3118e956d34acae49ea87ad8d326dda7fce630 100644 (file)
@@ -31,8 +31,7 @@
 #include "inference_runtime_internal.h"
 #include "beyond_generic_internal.h"
 
-struct beyond_inference_runtime {
-    beyond_generic_handle _generic;
+struct beyond_inference_runtime : public beyond_generic_handle {
     beyond::EventLoop *eventLoop;
     beyond::EventLoop::HandlerObject *handlerObject;
 
index 2bd52b0998ce6747606664c31661f6c170bcb799..c1c3cb47c840e5ff35981ece4f45d88b4975e84f 100644 (file)
@@ -28,8 +28,7 @@
 #include "authenticator_internal.h"
 #include "beyond_tizen_internal.h"
 
-struct beyond_authenticator {
-    beyond_tizen_handle _tizen;
+struct beyond_authenticator : public beyond_tizen_handle {
     GPollFD eventFD;
 
     int (*eventHandler)(beyond_authenticator_h auth, struct beyond_event_info *event, void *data);
index a2913c75d9d8577e502591421a33151b5ca67370..c80b2138bfda33e35abfb84413b29934c711a701 100644 (file)
@@ -30,8 +30,7 @@
 
 #include "beyond_tizen_internal.h"
 
-struct beyond_discovery {
-    beyond_tizen_handle _tizen;
+struct beyond_discovery : public beyond_tizen_handle {
     GPollFD eventFD;
 
     int (*eventHandler)(beyond_discovery_h handle, struct beyond_event_info *event, void *data);
index 4097306f306cf0c326a55c2e598cd40985aeaf08..a283315466a77de2ada46fc1f6a00d77b6709783 100644 (file)
@@ -35,8 +35,7 @@
 
 #include "beyond_tizen_internal.h"
 
-struct beyond_inference {
-    beyond_tizen_handle _tizen;
+struct beyond_inference : public beyond_tizen_handle {
     GPollFD eventFD;
 
     void (*output)(beyond_inference_h handle, struct beyond_event_info *event, void *data);
index 4f494532c663132950060f63d8eb06ff5cb9caa3..599491770e0f29d66e1a4b4b5baf7f57f1ae02d7 100644 (file)
@@ -33,8 +33,7 @@
 #include "authenticator_internal.h"
 #include "beyond_tizen_internal.h"
 
-struct beyond_peer {
-    beyond_tizen_handle _tizen;
+struct beyond_peer : public beyond_tizen_handle {
     GPollFD eventFD;
 
     int (*eventHandler)(beyond_peer_h handle, struct beyond_event_info *event, void *data);
index 3cf89b53d62a8a25a9ed4e0e304adbc499f966fd..ac0db0bac2f47cdc21695435b26b694c39a19bb1 100644 (file)
@@ -28,8 +28,7 @@
 #include "inference_runtime_internal.h"
 #include "beyond_tizen_internal.h"
 
-struct beyond_runtime {
-    beyond_tizen_handle _tizen;
+struct beyond_runtime : public beyond_tizen_handle {
     GPollFD eventFD;
 
     int (*eventHandler)(beyond_runtime_h handle, struct beyond_event_info *event, void *data);