|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/object/objcode.h |
source navigation diff markup identifier search freetext search file search |
1 /* objcode.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
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 have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Name: objcode.h
27 *
28 * Author: James Ostell
29 *
30 * Version Creation Date: 8/10/92
31 *
32 * $Revision: 6.0 $
33 *
34 * File Description: Object manager interface for module NCBI-SeqCode
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * Date Name Description of modification
39 * ------- ---------- -----------------------------------------------------
40 *
41 *
42 * $Log: objcode.h,v $
43 * Revision 6.0 1997/08/25 18:49:35 madden
44 * Revision changed to 6.0
45 *
46 * Revision 4.1 1997/06/19 18:41:01 vakatov
47 * [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
48 *
49 * Revision 4.0 1995/07/26 13:48:06 ostell
50 * force revision to 4.0
51 *
52 * Revision 3.1 1995/05/15 21:22:00 ostell
53 * added Log line
54 *
55 *
56 *
57 * ==========================================================================
58 */
59
60 #ifndef _NCBI_SeqCode_
61 #define _NCBI_SeqCode_
62
63 #ifndef _ASNTOOL_
64 #include <asn.h>
65 #endif
66
67 #undef NLM_EXTERN
68 #ifdef NLM_IMPORT
69 #define NLM_EXTERN NLM_IMPORT
70 #else
71 #define NLM_EXTERN extern
72 #endif
73
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77
78 /*****************************************************************************
79 *
80 * loader
81 *
82 *****************************************************************************/
83 NLM_EXTERN Boolean LIBCALL SeqCodeAsnLoad PROTO((void));
84
85 /*****************************************************************************
86 *
87 * SeqMapTable - Table from mapping sequence codes to each other
88 * Codes ALWAYS start from 0 and increase continuously
89 * IUPAC has 65 empty rows
90 *
91 *****************************************************************************/
92 typedef struct seqmaptable {
93 Uint1 from, /* as ENUMERATED in Seq-code-type */
94 to;
95 Uint1 num;
96 Uint1 start_at;
97 Uint1Ptr table;
98 struct seqmaptable PNTR next;
99 } SeqMapTable, PNTR SeqMapTablePtr;
100
101 NLM_EXTERN SeqMapTablePtr LIBCALL SeqMapTableNew PROTO((void));
102 NLM_EXTERN Boolean LIBCALL SeqMapTableAsnWrite PROTO((SeqMapTablePtr smp, AsnIoPtr aip, AsnTypePtr atp));
103 NLM_EXTERN SeqMapTablePtr LIBCALL SeqMapTableAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
104 NLM_EXTERN SeqMapTablePtr LIBCALL SeqMapTableFree PROTO((SeqMapTablePtr smp));
105
106 NLM_EXTERN SeqMapTablePtr LIBCALL SeqMapTableFindObj PROTO((Uint1 to, Uint1 from));
107
108 /*****************************************************************************
109 *
110 * SeqCodeTable - Table of sequence codes
111 * in code order, starting with 0 and increasing continuously
112 *
113 *****************************************************************************/
114 typedef struct seqcodetable {
115 Uint1 code; /* as ENUMERATED in Seq-code-type */
116 Uint1 num; /* number of codes */
117 Boolean one_letter; /* one letter codes? */
118 Uint1 start_at; /* index offset of first code */
119 CharPtr letters; /* one letter codes */
120 CharPtr PNTR symbols; /* multi-length codes */
121 CharPtr PNTR names; /* explanatory names */
122 Uint1Ptr comps; /* maps to complements */
123 struct seqcodetable PNTR next;
124 } SeqCodeTable, PNTR SeqCodeTablePtr;
125
126 NLM_EXTERN SeqCodeTablePtr LIBCALL SeqCodeTableNew PROTO((void));
127 NLM_EXTERN Boolean LIBCALL SeqCodeTableAsnWrite PROTO((SeqCodeTablePtr scp, AsnIoPtr aip, AsnTypePtr atp));
128 NLM_EXTERN SeqCodeTablePtr LIBCALL SeqCodeTableAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
129 NLM_EXTERN SeqCodeTablePtr LIBCALL SeqCodeTableFree PROTO((SeqCodeTablePtr scp));
130
131 NLM_EXTERN SeqCodeTablePtr LIBCALL SeqCodeTableFindObj PROTO((Uint1 code));
132
133 /*****************************************************************************
134 *
135 * SeqCodeSet - Set of sequence codes and maps
136 *
137 *****************************************************************************/
138 typedef struct seqcodeset {
139 SeqCodeTablePtr codes;
140 SeqMapTablePtr maps;
141 } SeqCodeSet, PNTR SeqCodeSetPtr;
142
143 NLM_EXTERN SeqCodeSetPtr LIBCALL SeqCodeSetNew PROTO((void));
144 NLM_EXTERN Boolean LIBCALL SeqCodeSetAsnWrite PROTO((SeqCodeSetPtr ssp, AsnIoPtr aip, AsnTypePtr atp));
145 NLM_EXTERN SeqCodeSetPtr LIBCALL SeqCodeSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
146 NLM_EXTERN SeqCodeSetPtr LIBCALL SeqCodeSetFree PROTO((SeqCodeSetPtr ssp));
147
148 /*****************************************************************************
149 *
150 * SeqCodeSetLoad()
151 * loads the standard sequence codes from "seqcode.val" in "data"
152 *
153 *****************************************************************************/
154 NLM_EXTERN SeqCodeSetPtr LIBCALL SeqCodeSetLoad PROTO((void));
155
156 #ifdef __cplusplus
157 }
158 #endif
159
160 #undef NLM_EXTERN
161 #ifdef NLM_EXPORT
162 #define NLM_EXTERN NLM_EXPORT
163 #else
164 #define NLM_EXTERN
165 #endif
166
167 #endif
168 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |