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

Go to the SVN repository for this file.

1 #ifndef OBJECTS_SEQLOC___SEQLOC_MACROS__HPP
2 #define OBJECTS_SEQLOC___SEQLOC_MACROS__HPP
3 
4 /* $Id: seqloc_macros.hpp 57669 2013-04-03 19:01:36Z ucko $
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 seqloc_macros.hpp
34 /// Utility macros and typedefs for exploring NCBI objects from seqloc.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_id definitions
54 
55 #define NCBI_SEQID(Type) CSeq_id::e_##Type
57 
58 // Local Gibbsq Gibbmt Giim
59 // Genbank Embl Pir Swissprot
60 // Patent Other General Gi
61 // Ddbj Prf Pdb Tpg
62 // Tpe Tpd Gpipe Named_annot_track
63 
64 #define NCBI_ACCN(Type) CSeq_id::eAcc_##Type
66 
67 
68 /// CSeq_loc definitions
69 
70 #define NCBI_SEQLOC(Type) CSeq_loc::e_##Type
72 
73 // Null Empty Whole Int Packed_int Pnt
74 // Packed_pnt Mix Equiv Bond Feat
75 
76 
77 // "FOR_EACH_XXX_ON_YYY" does a linear const traversal of STL containers
78 // "EDIT_EACH_XXX_ON_YYY" does a linear non-const traversal of STL containers
79 
80 // "SWITCH_ON_XXX_CHOICE" switches on the item subtype
81 
82 // "ADD_XXX_TO_YYY" adds an element to a specified object
83 // "ERASE_XXX_ON_YYY" deletes a specified object within an iterator
84 
85 // Miscellaneous macros for testing objects include
86 // "XXX_IS_YYY" or "XXX_HAS_YYY"
87 // "XXX_CHOICE_IS"
88 
89 
90 ///
91 /// CSeq_id macros
92 
93 /// SEQID_CHOICE macros
94 
95 #define SEQID_CHOICE_Test(Var) (Var).Which() != CSeq_id::e_not_set
96 #define SEQID_CHOICE_Chs(Var) (Var).Which()
97 
98 /// SEQID_CHOICE_IS
99 
100 #define SEQID_CHOICE_IS(Var, Chs) \
101 CHOICE_IS (SEQID_CHOICE, Var, Chs)
102 
103 /// SWITCH_ON_SEQID_CHOICE
104 
105 #define SWITCH_ON_SEQID_CHOICE(Var) \
106 SWITCH_ON (SEQID_CHOICE, Var)
107 
108 
111 
112 
113 /* @} */
114 
115 #endif /* OBJECTS_SEQLOC___SEQLOC_MACROS__HPP */
EAccessionInfo
For IdentifyAccession (below)
Definition: Seq_id.hpp:220
#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_id_.hpp:93
E_Choice
Choice variants.
Definition: Seq_loc_.hpp:96
CSeq_id::EAccessionInfo TACCN_CHOICE
CSeq_id::E_Choice TSEQID_CHOICE
CSeq_loc::E_Choice TSEQLOC_TYPE
Generic utility macros and templates for exploring NCBI objects.
Modified on Fri Sep 20 14:57:57 2024 by modify_doxy.py rev. 669887