1 /*===========================================================================
2 *
3 *                            PUBLIC DOMAIN NOTICE
4 *               National Center for Biotechnology Information
5 *
6 *  This software/database is a "United States Government Work" under the
7 *  terms of the United States Copyright Act.  It was written as part of
8 *  the author's official duties as a United States Government employee and
9 *  thus cannot be copyrighted.  This software/database is freely available
10 *  to the public for use. The National Library of Medicine and the U.S.
11 *  Government have not placed any restriction on its use or reproduction.
12 *
13 *  Although all reasonable efforts have been taken to ensure the accuracy
14 *  and reliability of the software and data, the NLM and the U.S.
15 *  Government do not and cannot warrant the performance or results that
16 *  may be obtained by using this software or data. The NLM and the U.S.
17 *  Government disclaim all warranties, express or implied, including
18 *  warranties of performance, merchantability or fitness for any particular
19 *  purpose.
20 *
21 *  Please cite the author in any work or product based on this material.
22 *
23 * ===========================================================================
24 *
25 */
26 
27 #include "py_PileupEventItf.h"
28 #include "py_ErrorMsg.hpp"
29 
30 #include <ngs/itf/PileupEventItf.hpp>
31 
PY_NGS_PileupEventGetMappingQuality(void * pRef,int32_t * pRet,void ** ppNGSStrError)32 PY_RES_TYPE PY_NGS_PileupEventGetMappingQuality ( void* pRef, int32_t* pRet, void** ppNGSStrError )
33 {
34     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
35     try
36     {
37         int32_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getMappingQuality ();
38         assert (pRet != NULL);
39         *pRet = (int32_t) res;
40         ret = PY_RES_OK;
41     }
42     catch ( ngs::ErrorMsg & x )
43     {
44         ret = ExceptionHandler ( x, ppNGSStrError );
45     }
46     catch ( std::exception & x )
47     {
48         ret = ExceptionHandler ( x, ppNGSStrError );
49     }
50     catch ( ... )
51     {
52         ret = ExceptionHandler ( ppNGSStrError );
53     }
54 
55     return ret;
56 }
57 
PY_NGS_PileupEventGetAlignmentId(void * pRef,void ** pRet,void ** ppNGSStrError)58 PY_RES_TYPE PY_NGS_PileupEventGetAlignmentId ( void* pRef, void** pRet, void** ppNGSStrError )
59 {
60     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
61     try
62     {
63         void* res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getAlignmentId ();
64         assert (pRet != NULL);
65         *pRet = (void*) res;
66         ret = PY_RES_OK;
67     }
68     catch ( ngs::ErrorMsg & x )
69     {
70         ret = ExceptionHandler ( x, ppNGSStrError );
71     }
72     catch ( std::exception & x )
73     {
74         ret = ExceptionHandler ( x, ppNGSStrError );
75     }
76     catch ( ... )
77     {
78         ret = ExceptionHandler ( ppNGSStrError );
79     }
80 
81     return ret;
82 }
83 
PY_NGS_PileupEventGetAlignmentPosition(void * pRef,int64_t * pRet,void ** ppNGSStrError)84 PY_RES_TYPE PY_NGS_PileupEventGetAlignmentPosition ( void* pRef, int64_t* pRet, void** ppNGSStrError )
85 {
86     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
87     try
88     {
89         int64_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getAlignmentPosition ();
90         assert (pRet != NULL);
91         *pRet = (int64_t) res;
92         ret = PY_RES_OK;
93     }
94     catch ( ngs::ErrorMsg & x )
95     {
96         ret = ExceptionHandler ( x, ppNGSStrError );
97     }
98     catch ( std::exception & x )
99     {
100         ret = ExceptionHandler ( x, ppNGSStrError );
101     }
102     catch ( ... )
103     {
104         ret = ExceptionHandler ( ppNGSStrError );
105     }
106 
107     return ret;
108 }
109 
PY_NGS_PileupEventGetFirstAlignmentPosition(void * pRef,int64_t * pRet,void ** ppNGSStrError)110 PY_RES_TYPE PY_NGS_PileupEventGetFirstAlignmentPosition ( void* pRef, int64_t* pRet, void** ppNGSStrError )
111 {
112     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
113     try
114     {
115         int64_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getFirstAlignmentPosition ();
116         assert (pRet != NULL);
117         *pRet = (int64_t) res;
118         ret = PY_RES_OK;
119     }
120     catch ( ngs::ErrorMsg & x )
121     {
122         ret = ExceptionHandler ( x, ppNGSStrError );
123     }
124     catch ( std::exception & x )
125     {
126         ret = ExceptionHandler ( x, ppNGSStrError );
127     }
128     catch ( ... )
129     {
130         ret = ExceptionHandler ( ppNGSStrError );
131     }
132 
133     return ret;
134 }
135 
PY_NGS_PileupEventGetLastAlignmentPosition(void * pRef,int64_t * pRet,void ** ppNGSStrError)136 PY_RES_TYPE PY_NGS_PileupEventGetLastAlignmentPosition ( void* pRef, int64_t* pRet, void** ppNGSStrError )
137 {
138     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
139     try
140     {
141         int64_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getLastAlignmentPosition ();
142         assert (pRet != NULL);
143         *pRet = (int64_t) res;
144         ret = PY_RES_OK;
145     }
146     catch ( ngs::ErrorMsg & x )
147     {
148         ret = ExceptionHandler ( x, ppNGSStrError );
149     }
150     catch ( std::exception & x )
151     {
152         ret = ExceptionHandler ( x, ppNGSStrError );
153     }
154     catch ( ... )
155     {
156         ret = ExceptionHandler ( ppNGSStrError );
157     }
158 
159     return ret;
160 }
161 
PY_NGS_PileupEventGetEventType(void * pRef,uint32_t * pRet,void ** ppNGSStrError)162 PY_RES_TYPE PY_NGS_PileupEventGetEventType ( void* pRef, uint32_t* pRet, void** ppNGSStrError )
163 {
164     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
165     try
166     {
167         uint32_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getEventType ();
168         assert (pRet != NULL);
169         *pRet = (uint32_t) res;
170         ret = PY_RES_OK;
171     }
172     catch ( ngs::ErrorMsg & x )
173     {
174         ret = ExceptionHandler ( x, ppNGSStrError );
175     }
176     catch ( std::exception & x )
177     {
178         ret = ExceptionHandler ( x, ppNGSStrError );
179     }
180     catch ( ... )
181     {
182         ret = ExceptionHandler ( ppNGSStrError );
183     }
184 
185     return ret;
186 }
187 
PY_NGS_PileupEventGetAlignmentBase(void * pRef,char * pRet,void ** ppNGSStrError)188 PY_RES_TYPE PY_NGS_PileupEventGetAlignmentBase ( void* pRef, char* pRet, void** ppNGSStrError )
189 {
190     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
191     try
192     {
193         char res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getAlignmentBase ();
194         assert (pRet != NULL);
195         *pRet = (char) res;
196         ret = PY_RES_OK;
197     }
198     catch ( ngs::ErrorMsg & x )
199     {
200         ret = ExceptionHandler ( x, ppNGSStrError );
201     }
202     catch ( std::exception & x )
203     {
204         ret = ExceptionHandler ( x, ppNGSStrError );
205     }
206     catch ( ... )
207     {
208         ret = ExceptionHandler ( ppNGSStrError );
209     }
210 
211     return ret;
212 }
213 
PY_NGS_PileupEventGetAlignmentQuality(void * pRef,char * pRet,void ** ppNGSStrError)214 PY_RES_TYPE PY_NGS_PileupEventGetAlignmentQuality ( void* pRef, char* pRet, void** ppNGSStrError )
215 {
216     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
217     try
218     {
219         char res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getAlignmentQuality ();
220         assert (pRet != NULL);
221         *pRet = (char) res;
222         ret = PY_RES_OK;
223     }
224     catch ( ngs::ErrorMsg & x )
225     {
226         ret = ExceptionHandler ( x, ppNGSStrError );
227     }
228     catch ( std::exception & x )
229     {
230         ret = ExceptionHandler ( x, ppNGSStrError );
231     }
232     catch ( ... )
233     {
234         ret = ExceptionHandler ( ppNGSStrError );
235     }
236 
237     return ret;
238 }
239 
PY_NGS_PileupEventGetInsertionBases(void * pRef,void ** pRet,void ** ppNGSStrError)240 PY_RES_TYPE PY_NGS_PileupEventGetInsertionBases ( void* pRef, void** pRet, void** ppNGSStrError )
241 {
242     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
243     try
244     {
245         void* res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getInsertionBases ();
246         assert (pRet != NULL);
247         *pRet = (void*) res;
248         ret = PY_RES_OK;
249     }
250     catch ( ngs::ErrorMsg & x )
251     {
252         ret = ExceptionHandler ( x, ppNGSStrError );
253     }
254     catch ( std::exception & x )
255     {
256         ret = ExceptionHandler ( x, ppNGSStrError );
257     }
258     catch ( ... )
259     {
260         ret = ExceptionHandler ( ppNGSStrError );
261     }
262 
263     return ret;
264 }
265 
PY_NGS_PileupEventGetInsertionQualities(void * pRef,void ** pRet,void ** ppNGSStrError)266 PY_RES_TYPE PY_NGS_PileupEventGetInsertionQualities ( void* pRef, void** pRet, void** ppNGSStrError )
267 {
268     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
269     try
270     {
271         void* res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getInsertionQualities ();
272         assert (pRet != NULL);
273         *pRet = (void*) res;
274         ret = PY_RES_OK;
275     }
276     catch ( ngs::ErrorMsg & x )
277     {
278         ret = ExceptionHandler ( x, ppNGSStrError );
279     }
280     catch ( std::exception & x )
281     {
282         ret = ExceptionHandler ( x, ppNGSStrError );
283     }
284     catch ( ... )
285     {
286         ret = ExceptionHandler ( ppNGSStrError );
287     }
288 
289     return ret;
290 }
291 
PY_NGS_PileupEventGetEventRepeatCount(void * pRef,uint32_t * pRet,void ** ppNGSStrError)292 PY_RES_TYPE PY_NGS_PileupEventGetEventRepeatCount ( void* pRef, uint32_t* pRet, void** ppNGSStrError )
293 {
294     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
295     try
296     {
297         uint32_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getEventRepeatCount ();
298         assert (pRet != NULL);
299         *pRet = (uint32_t) res;
300         ret = PY_RES_OK;
301     }
302     catch ( ngs::ErrorMsg & x )
303     {
304         ret = ExceptionHandler ( x, ppNGSStrError );
305     }
306     catch ( std::exception & x )
307     {
308         ret = ExceptionHandler ( x, ppNGSStrError );
309     }
310     catch ( ... )
311     {
312         ret = ExceptionHandler ( ppNGSStrError );
313     }
314 
315     return ret;
316 }
317 
PY_NGS_PileupEventGetEventIndelType(void * pRef,uint32_t * pRet,void ** ppNGSStrError)318 PY_RES_TYPE PY_NGS_PileupEventGetEventIndelType ( void* pRef, uint32_t* pRet, void** ppNGSStrError )
319 {
320     PY_RES_TYPE ret = PY_RES_ERROR; // TODO: use xt_* codes
321     try
322     {
323         uint32_t res = CheckedCast< ngs::PileupEventItf* >(pRef) -> getEventIndelType ();
324         assert (pRet != NULL);
325         *pRet = (uint32_t) res;
326         ret = PY_RES_OK;
327     }
328     catch ( ngs::ErrorMsg & x )
329     {
330         ret = ExceptionHandler ( x, ppNGSStrError );
331     }
332     catch ( std::exception & x )
333     {
334         ret = ExceptionHandler ( x, ppNGSStrError );
335     }
336     catch ( ... )
337     {
338         ret = ExceptionHandler ( ppNGSStrError );
339     }
340 
341     return ret;
342 }
343 
344