|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/object/mapproj.h |
source navigation diff markup identifier search freetext search file search |
1 /* mapproj.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information (NCBI)
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government do not place any restriction on its use or reproduction.
13 * We would, however, appreciate having the NCBI and the author cited in
14 * any work or product based on this material
15 *
16 * Although all reasonable efforts have been taken to ensure the accuracy
17 * and reliability of the software and data, the NLM and the U.S.
18 * Government do not and cannot warrant the performance or results that
19 * may be obtained by using this software or data. The NLM and the U.S.
20 * Government disclaim all warranties, express or implied, including
21 * warranties of performance, merchantability or fitness for any particular
22 * purpose.
23 *
24 * ===========================================================================
25 *
26 * File Name: mapproj.h
27 *
28 * Author: Jonathan Kans
29 *
30 * Version Creation Date: 3/23/97
31 *
32 * $Revision: 6.6 $
33 *
34 * File Description: Mappings file for automatic ASN.1 code generation
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * Date Name Description of modification
39 * ------- ---------- -----------------------------------------------------
40 *
41 * ==========================================================================
42 */
43
44 #include <sequtil.h>
45 #include <mmdbapi.h>
46 #include <objpubme.h>
47
48 #if defined(NLM_EXTERN_LOADS)
49 #undef NLM_EXTERN_LOADS
50 #endif
51 #define NLM_EXTERN_LOADS { if (! AllObjLoad()) return FALSE; \
52 if (! objpubmeAsnLoad()) return FALSE; \
53 if (! objmmdb1AsnLoad()) return FALSE; \
54 if (! objmmdb2AsnLoad()) return FALSE; \
55 if (! objmmdb3AsnLoad()) return FALSE; }
56
57 #include <objproj.h> /* needed for ProjectPtr definition */
58
59 static Int2 LIBCALL ProjectLabel (ProjectPtr proj, CharPtr buffer, Int2 buflen, Uint1 content)
60 {
61 CharPtr name;
62 Int2 diff = 0;
63 static CharPtr proj_types[22] = {
64 "Project..",
65 "PubMed UID",
66 "Protein UID",
67 "Nucleotide UID" ,
68 "Sequence UID" ,
69 "Genome UID" ,
70 "Structure UID" ,
71 "PubMed ID",
72 "Protein ID",
73 "Nucleotide ID" ,
74 "Sequence ID" ,
75 "Genome ID" ,
76 "Structure ID" ,
77 "PubMed Entry",
78 "Protein Entry",
79 "Nucleotide Entry" ,
80 "Sequence Entry" ,
81 "Genome Entry" ,
82 "Structure Entry" ,
83 "Annotation" ,
84 "Location" ,
85 "Subproject" };
86 ValNodePtr pip;
87
88 if ((proj == NULL) || (buflen < 1))
89 return 0;
90
91 pip = proj->data;
92 if (pip == NULL)
93 return 0;
94
95 if (pip->choice <= 21)
96 name = proj_types[pip->choice];
97 else
98 name = proj_types[0];
99
100 switch (content)
101 {
102 case OM_LABEL_BOTH:
103 case OM_LABEL_CONTENT:
104 case OM_LABEL_SUMMARY:
105 case OM_LABEL_TYPE:
106 default:
107 diff = LabelCopy(buffer, name, buflen);
108 }
109 return diff;
110 }
111
112 static Uint2 LIBCALLBACK ProjectSubTypeFunc (Pointer ptr)
113 {
114 ValNodePtr pip;
115
116 if (ptr == NULL)
117 return 0;
118 pip = ((ProjectPtr)ptr)->data;
119 if (pip == NULL)
120 return 0;
121 return (Uint2)pip->choice;
122 }
123
124 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |