Fix svace issue : nullptr check for inputMethodContextP
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / dali-toolkit / transition-wrap.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // EXTERNAL INCLUDES
19 #include <dali-toolkit/public-api/transition/transition.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-csharp-binder/common/common.h>
23
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28
29   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_Transition()
30   {
31     void *jresult;
32     Dali::Toolkit::Transition *result = 0;
33
34     {
35       try
36       {
37         result = (Dali::Toolkit::Transition *)new Dali::Toolkit::Transition();
38       }
39       CALL_CATCH_EXCEPTION(0);
40     }
41
42     jresult = (void *)result;
43     return jresult;
44   }
45
46   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Transition_New(void *nuiSource, void *nuiDestination, bool useDestinationTarget, void *nuiTimePeriod)
47   {
48     void *jresult;
49     Dali::Toolkit::Control *source = (Dali::Toolkit::Control *)nuiSource;
50     Dali::Toolkit::Control *destination = (Dali::Toolkit::Control *)nuiDestination;
51     Dali::TimePeriod *timePeriod = (Dali::TimePeriod *)nuiTimePeriod;
52
53     Dali::Toolkit::Transition result;
54
55     {
56       try
57       {
58         result = Dali::Toolkit::Transition::New(*source, *destination, useDestinationTarget, *timePeriod);
59       }
60       CALL_CATCH_EXCEPTION(0);
61     }
62
63     jresult = new Dali::Toolkit::Transition((const Dali::Toolkit::Transition &)result);
64     return jresult;
65   }
66
67   SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_Transition(void *nuiTransition)
68   {
69     Dali::Toolkit::Transition *transition = (Dali::Toolkit::Transition *)0;
70
71     transition = (Dali::Toolkit::Transition *)nuiTransition;
72     {
73       try
74       {
75         delete transition;
76       }
77       CALL_CATCH_EXCEPTION();
78     }
79   }
80
81   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_Transition_Set(void *nuiTransition)
82   {
83     Dali::Toolkit::Transition *newTransition = 0;
84     Dali::Toolkit::Transition *transition = (Dali::Toolkit::Transition *)nuiTransition;
85     if (!transition)
86     {
87       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::Transition const & type is null", 0);
88       return 0;
89     }
90     {
91       try
92       {
93         newTransition = (Dali::Toolkit::Transition *)new Dali::Toolkit::Transition((Dali::Toolkit::Transition const &)*transition);
94       }
95       CALL_CATCH_EXCEPTION(0);
96     }
97     void *result;
98     result = (void *)newTransition;
99     return result;
100   }
101
102   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Transition_Assign(void *nuiDestination, void *nuiSource)
103   {
104     void *jresult;
105     Dali::Toolkit::Transition *destination = (Dali::Toolkit::Transition *)0;
106     Dali::Toolkit::Transition *source = 0;
107     Dali::Toolkit::Transition *result = 0;
108
109     destination = (Dali::Toolkit::Transition *)nuiDestination;
110     source = (Dali::Toolkit::Transition *)nuiSource;
111
112     if (!source)
113     {
114       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::Transition const & type is null", 0);
115       return 0;
116     }
117     {
118       try
119       {
120         result = (Dali::Toolkit::Transition *)&(destination)->operator=((Dali::Toolkit::Transition const &)*source);
121       }
122       CALL_CATCH_EXCEPTION(0);
123     }
124
125     jresult = (void *)result;
126     return jresult;
127   }
128
129 #ifdef __cplusplus
130 }
131 #endif