NCBI C++ ToolKit
seqset_macros.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef OBJECTS_SEQSET___SEQSET_MACROS__HPP
2 #define OBJECTS_SEQSET___SEQSET_MACROS__HPP
3 
4 /* $Id: seqset_macros.hpp 63054 2014-05-23 18:26:50Z kans $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Jonathan Kans, Michael Kornbluh, Colleen Bollin
30  *
31  */
32 
33 /// @file seqset_macros.hpp
34 /// Utility macros and typedefs for exploring NCBI objects from seqset.asn.
35 
36 
39 
40 
41 /// @NAME Convenience macros for NCBI objects
42 /// @{
43 
44 
47 
48 /////////////////////////////////////////////////////////////////////////////
49 /// Macros and typedefs for object subtypes
50 /////////////////////////////////////////////////////////////////////////////
51 
52 
53 /// CSeq_entry definitions
54 
55 #define NCBI_SEQENTRY(Type) CSeq_entry::e_##Type
57 
58 // Seq Set
59 
60 
61 /// CBioseq_set definitions
62 
63 #define NCBI_BIOSEQSETCLASS(Type) CBioseq_set::eClass_##Type
65 
66 // nuc_prot segset conset
67 // parts gibb gi
68 // genbank pir pub_set
69 // equiv swissprot pdb_entry
70 // mut_set pop_set phy_set
71 // eco_set gen_prod_set wgs_set
72 // named_annot named_annot_prod read_set
73 // paired_end_reads small_genome_set other
74 
75 
76 
77 /////////////////////////////////////////////////////////////////////////////
78 /// Macros to recursively explore within NCBI data model objects
79 /////////////////////////////////////////////////////////////////////////////
80 
81 
82 /// VISIT_WITHIN_SEQENTRY base macro makes recursive iterator with generated components
83 /// VISIT_WITHIN_SEQSET base macro makes recursive iterator with generated components
84 
85 #define VISIT_WITHIN_SEQENTRY(Typ, Itr, Var) \
86 NCBI_SERIAL_TEST_EXPLORE ((Var).Which() != CSeq_entry::e_not_set, Typ, Itr, (Var))
87 
88 #define VISIT_WITHIN_SEQSET(Typ, Itr, Var) \
89 NCBI_SERIAL_TEST_EXPLORE ((Var).IsSetSeq_set(), Typ, Itr, (Var))
90 
91 /// Base macros for editable exploration
92 
93 #define EXPLORE_WITHIN_SEQENTRY(Typ, Itr, Var) \
94 NCBI_SERIAL_NC_EXPLORE ((Var).Which() != CSeq_entry::e_not_set, Typ, Itr, (Var))
95 
96 #define EXPLORE_WITHIN_SEQSET(Typ, Itr, Var) \
97 NCBI_SERIAL_NC_EXPLORE ((Var).IsSetSeq_set(), Typ, Itr, (Var))
98 
99 
100 // "VISIT_ALL_XXX_WITHIN_YYY" does a recursive exploration of NCBI objects
101 
102 
103 /// CSeq_entry explorers
104 
105 /// VISIT_ALL_SEQENTRYS_WITHIN_SEQENTRY
106 // CSeq_entry& as input, dereference with const CSeq_entry& seqentry = *itr;
107 
108 #define VISIT_ALL_SEQENTRYS_WITHIN_SEQENTRY(Itr, Var) \
109 VISIT_WITHIN_SEQENTRY (CSeq_entry, Itr, Var)
110 
111 /// VISIT_ALL_BIOSEQS_WITHIN_SEQENTRY
112 // CSeq_entry& as input, dereference with const CBioseq& bioseq = *itr;
113 
114 #define VISIT_ALL_BIOSEQS_WITHIN_SEQENTRY(Itr, Var) \
115 VISIT_WITHIN_SEQENTRY (CBioseq, Itr, Var)
116 
117 /// EXPLORE_ALL_BIOSEQS_WITHIN_SEQENTRY
118 // CSeq_entry& as input, dereference with CBioseq& bioseq = *itr;
119 
120 #define EXPLORE_ALL_BIOSEQS_WITHIN_SEQENTRY(Itr, Var) \
121 EXPLORE_WITHIN_SEQENTRY (CBioseq, Itr, Var)
122 
123 /// VISIT_ALL_SEQSETS_WITHIN_SEQENTRY
124 // CSeq_entry& as input, dereference with const CBioseq_set& bss = *itr;
125 
126 #define VISIT_ALL_SEQSETS_WITHIN_SEQENTRY(Itr, Var) \
127 VISIT_WITHIN_SEQENTRY (CBioseq_set, Itr, Var)
128 
129 /// VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY
130 // CSeq_entry& as input, dereference with const CSeqdesc& desc = *itr;
131 
132 #define VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY(Itr, Var) \
133 VISIT_WITHIN_SEQENTRY (CSeqdesc, Itr, Var)
134 
135 #define VISIT_ALL_DESCRIPTORS_WITHIN_SEQENTRY VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY
136 
137 /// VISIT_ALL_SEQANNOTS_WITHIN_SEQENTRY
138 // CSeq_entry& as input, dereference with const CSeq_annot& annot = *itr;
139 
140 #define VISIT_ALL_SEQANNOTS_WITHIN_SEQENTRY(Itr, Var) \
141 VISIT_WITHIN_SEQENTRY (CSeq_annot, Itr, Var)
142 
143 #define VISIT_ALL_ANNOTS_WITHIN_SEQENTRY VISIT_ALL_SEQANNOTS_WITHIN_SEQENTRY
144 
145 /// VISIT_ALL_SEQFEATS_WITHIN_SEQENTRY
146 // CSeq_entry& as input, dereference with const CSeq_feat& feat = *itr;
147 
148 #define VISIT_ALL_SEQFEATS_WITHIN_SEQENTRY(Itr, Var) \
149 VISIT_WITHIN_SEQENTRY (CSeq_feat, Itr, Var)
150 
151 #define VISIT_ALL_FEATURES_WITHIN_SEQENTRY VISIT_ALL_SEQFEATS_WITHIN_SEQENTRY
152 
153 /// VISIT_ALL_SEQALIGNS_WITHIN_SEQENTRY
154 // CSeq_entry& as input, dereference with const CSeq_align& align = *itr;
155 
156 #define VISIT_ALL_SEQALIGNS_WITHIN_SEQENTRY(Itr, Var) \
157 VISIT_WITHIN_SEQENTRY (CSeq_align, Itr, Var)
158 
159 #define VISIT_ALL_ALIGNS_WITHIN_SEQENTRY VISIT_ALL_SEQALIGNS_WITHIN_SEQENTRY
160 
161 /// VISIT_ALL_SEQGRAPHS_WITHIN_SEQENTRY
162 // CSeq_entry& as input, dereference with const CSeq_graph& graph = *itr;
163 
164 #define VISIT_ALL_SEQGRAPHS_WITHIN_SEQENTRY(Itr, Var) \
165 VISIT_WITHIN_SEQENTRY (CSeq_graph, Itr, Var)
166 
167 #define VISIT_ALL_GRAPHS_WITHIN_SEQENTRY VISIT_ALL_SEQGRAPHS_WITHIN_SEQENTRY
168 
169 
170 /// CBioseq_set explorers
171 
172 /// VISIT_ALL_SEQENTRYS_WITHIN_SEQSET
173 // CBioseq_set& as input, dereference with const CSeq_entry& seqentry = *itr;
174 
175 #define VISIT_ALL_SEQENTRYS_WITHIN_SEQSET(Itr, Var) \
176 VISIT_WITHIN_SEQSET (CSeq_entry, Itr, Var)
177 
178 /// VISIT_ALL_BIOSEQS_WITHIN_SEQSET
179 // CBioseq_set& as input, dereference with const CBioseq& bioseq = *itr;
180 
181 #define VISIT_ALL_BIOSEQS_WITHIN_SEQSET(Itr, Var) \
182 VISIT_WITHIN_SEQSET (CBioseq, Itr, Var)
183 
184 /// EXPLORE_ALL_BIOSEQS_WITHIN_SEQSET
185 // CBioseq_set& as input, dereference with CBioseq& bioseq = *itr;
186 
187 #define EXPLORE_ALL_BIOSEQS_WITHIN_SEQSET(Itr, Var) \
188 EXPLORE_WITHIN_SEQSET (CBioseq, Itr, Var)
189 
190 /// VISIT_ALL_SEQSETS_WITHIN_SEQSET
191 // CBioseq_set& as input, dereference with const CBioseq_set& bss = *itr;
192 
193 #define VISIT_ALL_SEQSETS_WITHIN_SEQSET(Itr, Var) \
194 VISIT_WITHIN_SEQSET (CBioseq_set, Itr, Var)
195 
196 /// VISIT_ALL_SEQDESCS_WITHIN_SEQSET
197 // CBioseq_set& as input, dereference with const CSeqdesc& desc = *itr;
198 
199 #define VISIT_ALL_SEQDESCS_WITHIN_SEQSET(Itr, Var) \
200 VISIT_WITHIN_SEQSET (CSeqdesc, Itr, Var)
201 
202 #define VISIT_ALL_DESCRIPTORS_WITHIN_SEQSET VISIT_ALL_SEQDESCS_WITHIN_SEQSET
203 
204 /// VISIT_ALL_SEQANNOTS_WITHIN_SEQSET
205 // CBioseq_set& as input, dereference with const CSeq_annot& annot = *itr;
206 
207 #define VISIT_ALL_SEQANNOTS_WITHIN_SEQSET(Itr, Var) \
208 VISIT_WITHIN_SEQSET (CSeq_annot, Itr, Var)
209 
210 #define VISIT_ALL_ANNOTS_WITHIN_SEQSET VISIT_ALL_SEQANNOTS_WITHIN_SEQSET
211 
212 /// VISIT_ALL_SEQFEATS_WITHIN_SEQSET
213 // CBioseq_set& as input, dereference with const CSeq_feat& feat = *itr;
214 
215 #define VISIT_ALL_SEQFEATS_WITHIN_SEQSET(Itr, Var) \
216 VISIT_WITHIN_SEQSET (CSeq_feat, Itr, Var)
217 
218 #define VISIT_ALL_FEATURES_WITHIN_SEQSET VISIT_ALL_SEQFEATS_WITHIN_SEQSET
219 
220 /// VISIT_ALL_SEQALIGNS_WITHIN_SEQSET
221 // CBioseq_set& as input, dereference with const CSeq_align& align = *itr;
222 
223 #define VISIT_ALL_SEQALIGNS_WITHIN_SEQSET(Itr, Var) \
224 VISIT_WITHIN_SEQSET (CSeq_align, Itr, Var)
225 
226 #define VISIT_ALL_ALIGNS_WITHIN_SEQSET VISIT_ALL_SEQALIGNS_WITHIN_SEQSET
227 
228 /// VISIT_ALL_SEQGRAPHS_WITHIN_SEQSET
229 // CBioseq_set& as input, dereference with const CSeq_graph& graph = *itr;
230 
231 #define VISIT_ALL_SEQGRAPHS_WITHIN_SEQSET(Itr, Var) \
232 VISIT_WITHIN_SEQSET (CSeq_graph, Itr, Var)
233 
234 #define VISIT_ALL_GRAPHS_WITHIN_SEQSET VISIT_ALL_SEQGRAPHS_WITHIN_SEQSET
235 
236 
237 // "FOR_EACH_XXX_ON_YYY" does a linear const traversal of STL containers
238 // "EDIT_EACH_XXX_ON_YYY" does a linear non-const traversal of STL containers
239 
240 // "SWITCH_ON_XXX_CHOICE" switches on the item subtype
241 
242 // "ADD_XXX_TO_YYY" adds an element to a specified object
243 // "ERASE_XXX_ON_YYY" deletes a specified object within an iterator
244 
245 // Miscellaneous macros for testing objects include
246 // "XXX_IS_YYY" or "XXX_HAS_YYY"
247 // "XXX_CHOICE_IS"
248 
249 
250 ///
251 /// CSeq_entry macros
252 
253 /// SEQENTRY_CHOICE macros
254 
255 #define SEQENTRY_CHOICE_Test(Var) (Var).Which() != CSeq_entry::e_not_set
256 #define SEQENTRY_CHOICE_Chs(Var) (Var).Which()
257 
258 /// SEQENTRY_CHOICE_IS
259 
260 #define SEQENTRY_CHOICE_IS(Var, Chs) \
261 CHOICE_IS (SEQENTRY_CHOICE, Var, Chs)
262 
263 /// SEQENTRY_IS_SEQ
264 
265 #define SEQENTRY_IS_SEQ(Var) \
266 SEQENTRY_CHOICE_IS (Var, NCBI_SEQENTRY(Seq))
267 
268 /// SEQENTRY_IS_SET
269 
270 #define SEQENTRY_IS_SET(Var) \
271 SEQENTRY_CHOICE_IS (Var, NCBI_SEQENTRY(Set))
272 
273 /// SWITCH_ON_SEQENTRY_CHOICE
274 
275 #define SWITCH_ON_SEQENTRY_CHOICE(Var) \
276 SWITCH_ON (SEQENTRY_CHOICE, Var)
277 
278 
279 /// SEQDESC_ON_SEQENTRY macros
280 
281 #define SEQDESC_ON_SEQENTRY_Type CSeq_descr::Tdata
282 #define SEQDESC_ON_SEQENTRY_Test(Var) (Var).IsSetDescr()
283 #define SEQDESC_ON_SEQENTRY_Get(Var) (Var).GetDescr().Get()
284 #define SEQDESC_ON_SEQENTRY_Set(Var) (Var).SetDescr().Set()
285 
286 /// SEQENTRY_HAS_SEQDESC
287 
288 #define SEQENTRY_HAS_SEQDESC(Var) \
289 ITEM_HAS (SEQDESC_ON_SEQENTRY, Var)
290 
291 /// FOR_EACH_SEQDESC_ON_SEQENTRY
292 /// EDIT_EACH_SEQDESC_ON_SEQENTRY
293 // CSeq_entry& as input, dereference with [const] CSeqdesc& desc = **itr
294 
295 #define FOR_EACH_SEQDESC_ON_SEQENTRY(Itr, Var) \
296 FOR_EACH (SEQDESC_ON_SEQENTRY, Itr, Var)
297 
298 #define EDIT_EACH_SEQDESC_ON_SEQENTRY(Itr, Var) \
299 EDIT_EACH (SEQDESC_ON_SEQENTRY, Itr, Var)
300 
301 /// ADD_SEQDESC_TO_SEQENTRY
302 
303 #define ADD_SEQDESC_TO_SEQENTRY(Var, Ref) \
304 ADD_ITEM (SEQDESC_ON_SEQENTRY, Var, Ref)
305 
306 /// ERASE_SEQDESC_ON_SEQENTRY
307 
308 #define ERASE_SEQDESC_ON_SEQENTRY(Itr, Var) \
309 LIST_ERASE_ITEM (SEQDESC_ON_SEQENTRY, Itr, Var)
310 
311 /// SEQDESC_ON_SEQENTRY_IS_SORTED
312 
313 #define SEQDESC_ON_SEQENTRY_IS_SORTED( Var, Func ) \
314  IS_SORTED (SEQDESC_ON_SEQENTRY, Var, Func)
315 
316 #define SORT_SEQDESC_ON_SEQENTRY(Var, Func) \
317  DO_LIST_SORT (SEQDESC_ON_SEQENTRY, Var, Func)
318 
319 /// SEQENTRY_HAS_DESCRIPTOR
320 /// FOR_EACH_DESCRIPTOR_ON_SEQENTRY
321 /// EDIT_EACH_DESCRIPTOR_ON_SEQENTRY
322 /// ADD_DESCRIPTOR_TO_SEQENTRY
323 /// ERASE_DESCRIPTOR_ON_SEQENTRY
324 
325 #define SEQENTRY_HAS_DESCRIPTOR SEQENTRY_HAS_SEQDESC
326 #define FOR_EACH_DESCRIPTOR_ON_SEQENTRY FOR_EACH_SEQDESC_ON_SEQENTRY
327 #define EDIT_EACH_DESCRIPTOR_ON_SEQENTRY EDIT_EACH_SEQDESC_ON_SEQENTRY
328 #define ADD_DESCRIPTOR_TO_SEQENTRY ADD_SEQDESC_TO_SEQENTRY
329 #define ERASE_DESCRIPTOR_ON_SEQENTRY ERASE_SEQDESC_ON_SEQENTRY
330 
331 
332 /// SEQANNOT_ON_SEQENTRY macros
333 
334 #define SEQANNOT_ON_SEQENTRY_Type CSeq_entry::TAnnot
335 #define SEQANNOT_ON_SEQENTRY_Test(Var) (Var).IsSetAnnot()
336 #define SEQANNOT_ON_SEQENTRY_Get(Var) (Var).GetAnnot()
337 #define SEQANNOT_ON_SEQENTRY_Set(Var) (Var).(Seq).SetAnnot()
338 
339 /// SEQENTRY_HAS_SEQANNOT
340 
341 #define SEQENTRY_HAS_SEQANNOT(Var) \
342 ITEM_HAS (SEQANNOT_ON_SEQENTRY, Var)
343 
344 /// FOR_EACH_SEQANNOT_ON_SEQENTRY
345 /// EDIT_EACH_SEQANNOT_ON_SEQENTRY
346 // CSeq_entry& as input, dereference with [const] CSeq_annot& annot = **itr;
347 
348 #define FOR_EACH_SEQANNOT_ON_SEQENTRY(Itr, Var) \
349 FOR_EACH (SEQANNOT_ON_SEQENTRY, Itr, Var)
350 
351 #define EDIT_EACH_SEQANNOT_ON_SEQENTRY(Itr, Var) \
352 EDIT_EACH (SEQANNOT_ON_SEQENTRY, Itr, Var)
353 
354 /// ADD_SEQANNOT_TO_SEQENTRY
355 
356 #define ADD_SEQANNOT_TO_SEQENTRY(Var, Ref) \
357 ADD_ITEM (SEQANNOT_ON_SEQENTRY, Var, Ref)
358 
359 /// ERASE_SEQANNOT_ON_SEQENTRY
360 
361 #define ERASE_SEQANNOT_ON_SEQENTRY(Itr, Var) \
362 LIST_ERASE_ITEM (SEQANNOT_ON_SEQENTRY, Itr, Var)
363 
364 /// SEQENTRY_HAS_ANNOT
365 /// FOR_EACH_ANNOT_ON_SEQENTRY
366 /// EDIT_EACH_ANNOT_ON_SEQENTRY
367 /// ADD_ANNOT_TO_SEQENTRY
368 /// ERASE_ANNOT_ON_SEQENTRY
369 
370 #define SEQENTRY_HAS_ANNOT SEQENTRY_HAS_SEQANNOT
371 #define FOR_EACH_ANNOT_ON_SEQENTRY FOR_EACH_SEQANNOT_ON_SEQENTRY
372 #define EDIT_EACH_ANNOT_ON_SEQENTRY EDIT_EACH_SEQANNOT_ON_SEQENTRY
373 #define ADD_ANNOT_TO_SEQENTRY ADD_SEQANNOT_TO_SEQENTRY
374 #define ERASE_ANNOT_ON_SEQENTRY ERASE_SEQANNOT_ON_SEQENTRY
375 
376 
377 ///
378 /// CBioseq_set macros
379 
380 /// SEQDESC_ON_SEQSET macros
381 
382 #define SEQDESC_ON_SEQSET_Type CBioseq_set::TDescr::Tdata
383 #define SEQDESC_ON_SEQSET_Test(Var) (Var).IsSetDescr()
384 #define SEQDESC_ON_SEQSET_Get(Var) (Var).GetDescr().Get()
385 #define SEQDESC_ON_SEQSET_Set(Var) (Var).SetDescr().Set()
386 
387 /// SEQSET_HAS_SEQDESC
388 
389 #define SEQSET_HAS_SEQDESC(Var) \
390 ITEM_HAS (SEQDESC_ON_SEQSET, Var)
391 
392 /// FOR_EACH_SEQDESC_ON_SEQSET
393 /// EDIT_EACH_SEQDESC_ON_SEQSET
394 // CBioseq_set& as input, dereference with [const] CSeqdesc& desc = **itr;
395 
396 #define FOR_EACH_SEQDESC_ON_SEQSET(Itr, Var) \
397 FOR_EACH (SEQDESC_ON_SEQSET, Itr, Var)
398 
399 #define EDIT_EACH_SEQDESC_ON_SEQSET(Itr, Var) \
400 EDIT_EACH (SEQDESC_ON_SEQSET, Itr, Var)
401 
402 /// ADD_SEQDESC_TO_SEQSET
403 
404 #define ADD_SEQDESC_TO_SEQSET(Var, Ref) \
405 ADD_ITEM (SEQDESC_ON_SEQSET, Var, Ref)
406 
407 /// ERASE_SEQDESC_ON_SEQSET
408 
409 #define ERASE_SEQDESC_ON_SEQSET(Itr, Var) \
410 LIST_ERASE_ITEM (SEQDESC_ON_SEQSET, Itr, Var)
411 
412 /// SEQSET_HAS_DESCRIPTOR
413 /// FOR_EACH_DESCRIPTOR_ON_SEQSET
414 /// EDIT_EACH_DESCRIPTOR_ON_SEQSET
415 /// ADD_DESCRIPTOR_TO_SEQSET
416 /// ERASE_DESCRIPTOR_ON_SEQSET
417 
418 #define SEQSET_HAS_DESCRIPTOR SEQSET_HAS_SEQDESC
419 #define FOR_EACH_DESCRIPTOR_ON_SEQSET FOR_EACH_SEQDESC_ON_SEQSET
420 #define EDIT_EACH_DESCRIPTOR_ON_SEQSET EDIT_EACH_SEQDESC_ON_SEQSET
421 #define ADD_DESCRIPTOR_TO_SEQSET ADD_SEQDESC_TO_SEQSET
422 #define ERASE_DESCRIPTOR_ON_SEQSET ERASE_SEQDESC_ON_SEQSET
423 
424 
425 /// SEQANNOT_ON_SEQSET macros
426 
427 #define SEQANNOT_ON_SEQSET_Type CBioseq_set::TAnnot
428 #define SEQANNOT_ON_SEQSET_Test(Var) (Var).IsSetAnnot()
429 #define SEQANNOT_ON_SEQSET_Get(Var) (Var).GetAnnot()
430 #define SEQANNOT_ON_SEQSET_Set(Var) (Var).SetAnnot()
431 
432 /// SEQSET_HAS_SEQANNOT
433 
434 #define SEQSET_HAS_SEQANNOT(Var) \
435 ITEM_HAS (SEQANNOT_ON_SEQSET, Var)
436 
437 /// FOR_EACH_SEQANNOT_ON_SEQSET
438 /// EDIT_EACH_SEQANNOT_ON_SEQSET
439 // CBioseq_set& as input, dereference with [const] CSeq_annot& annot = **itr;
440 
441 #define FOR_EACH_SEQANNOT_ON_SEQSET(Itr, Var) \
442 FOR_EACH (SEQANNOT_ON_SEQSET, Itr, Var)
443 
444 #define EDIT_EACH_SEQANNOT_ON_SEQSET(Itr, Var) \
445 EDIT_EACH (SEQANNOT_ON_SEQSET, Itr, Var)
446 
447 /// ADD_SEQANNOT_TO_SEQSET
448 
449 #define ADD_SEQANNOT_TO_SEQSET(Var, Ref) \
450 ADD_ITEM (SEQANNOT_ON_SEQSET, Var, Ref)
451 
452 /// ERASE_SEQANNOT_ON_SEQSET
453 
454 #define ERASE_SEQANNOT_ON_SEQSET(Itr, Var) \
455 LIST_ERASE_ITEM (SEQANNOT_ON_SEQSET, Itr, Var)
456 
457 /// SEQSET_HAS_ANNOT
458 /// FOR_EACH_ANNOT_ON_SEQSET
459 /// EDIT_EACH_ANNOT_ON_SEQSET
460 /// ADD_ANNOT_TO_SEQSET
461 /// ERASE_ANNOT_ON_SEQSET
462 
463 #define SEQSET_HAS_ANNOT SEQSET_HAS_SEQANNOT
464 #define FOR_EACH_ANNOT_ON_SEQSET FOR_EACH_SEQANNOT_ON_SEQSET
465 #define EDIT_EACH_ANNOT_ON_SEQSET EDIT_EACH_SEQANNOT_ON_SEQSET
466 #define ADD_ANNOT_TO_SEQSET ADD_SEQANNOT_TO_SEQSET
467 #define ERASE_ANNOT_ON_SEQSET ERASE_SEQANNOT_ON_SEQSET
468 
469 
470 /// SEQENTRY_ON_SEQSET macros
471 
472 #define SEQENTRY_ON_SEQSET_Type CBioseq_set::TSeq_set
473 #define SEQENTRY_ON_SEQSET_Test(Var) (Var).IsSetSeq_set()
474 #define SEQENTRY_ON_SEQSET_Get(Var) (Var).GetSeq_set()
475 #define SEQENTRY_ON_SEQSET_Set(Var) (Var).SetSeq_set()
476 
477 /// SEQSET_HAS_SEQENTRY
478 
479 #define SEQSET_HAS_SEQENTRY(Var) \
480 ITEM_HAS (SEQENTRY_ON_SEQSET, Var)
481 
482 /// FOR_EACH_SEQENTRY_ON_SEQSET
483 /// EDIT_EACH_SEQENTRY_ON_SEQSET
484 // CBioseq_set& as input, dereference with [const] CSeq_entry& se = **itr;
485 
486 #define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var) \
487 FOR_EACH (SEQENTRY_ON_SEQSET, Itr, Var)
488 
489 #define EDIT_EACH_SEQENTRY_ON_SEQSET(Itr, Var) \
490 EDIT_EACH (SEQENTRY_ON_SEQSET, Itr, Var)
491 
492 /// ADD_SEQENTRY_TO_SEQSET
493 
494 #define ADD_SEQENTRY_TO_SEQSET(Var, Ref) \
495 ADD_ITEM (SEQENTRY_ON_SEQSET, Var, Ref)
496 
497 /// ERASE_SEQENTRY_ON_SEQSET
498 
499 #define ERASE_SEQENTRY_ON_SEQSET(Itr, Var) \
500 LIST_ERASE_ITEM (SEQENTRY_ON_SEQSET, Itr, Var)
501 
502 
505 
506 
507 /* @} */
508 
509 #endif /* OBJECTS_SEQSET___SEQSET_MACROS__HPP */
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
E_Choice
Choice variants.
Definition: Seq_entry_.hpp:87
CBioseq_set::EClass TBIOSEQSETCLASS_TYPE
CSeq_entry::E_Choice TSEQENTRY_CHOICE
Generic utility macros and templates for exploring NCBI objects.
Modified on Tue Apr 23 07:38:05 2024 by modify_doxy.py rev. 669887