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

Go to the SVN repository for this file.

1 /* $Id: MSModSpecSet.hpp 37812 2008-05-06 21:33:33Z slottad $
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  */
27 
28 /// @MSModSpecSet.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'omssa.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: MSModSpecSet_.hpp
37 
38 
39 #ifndef OBJECTS_OMSSA_MSMODSPECSET_HPP
40 #define OBJECTS_OMSSA_MSMODSPECSET_HPP
41 
42 
43 // generated includes
45 #include <objects/omssa/MSMod.hpp>
46 
47 // generated classes
48 
50 
51 BEGIN_objects_SCOPE // namespace ncbi::objects::
52 
53 /////////////////////////////////////////////////////////////////////////////
55 {
57 public:
58  // constructor
59  CMSModSpecSet(void);
60  // destructor
61  ~CMSModSpecSet(void);
62 
63  //! concatenates in another CMSModSpecSet
64  void Append(const CMSModSpecSet &ModsIn);
65 
66  //! creates arrays for the existing set
67  void CreateArrays(void);
68 
69  //! Have the arrays been intialized?
70  bool IsArrayed(void);
71 
72  //! get modification AA's
73  /*!
74  \param Mod the modification number
75  \param Number the residue number for the modification type
76  */
77  char GetModChar(int Mod, int Number) const;
78 
79  //! get the number of modification AA's
80  /*!
81  \param Mod the modification number
82  */
83  int GetModNumChars(int Mod) const;
84 
85  //! get modification mass
86  /*!
87  \param Mod the modification number
88  */
89  int GetModMass(int Mod) const;
90 
91  /**
92  * get neutral loss
93  *
94  * @param Mod the modification number
95  */
96  int GetNeutralLoss(int Mod) const;
97 
98  //! get modification friendly name
99  /*!
100  \param Mod the modification number
101  */
102  const char * GetModName(int Mod) const;
103 
104  //! get unimod name
105  /*!
106  \param Mod the modification number
107  */
108  const char * GetUnimodName(int Mod) const;
109 
110  //! get modification type
111  /*!
112  \param Mod the modification number
113  */
114  EMSModType GetModType(int Mod) const;
115 
116  //! the maximum size of an modification friendly name
117  static const int kMaxNameSize = 128;
118 
119  //! the maximum number of AA's a modification can affect
120  static const int kMaxAAs = 3;
121 
122 private:
123  // Prohibit copy constructor and assignment operator
126 
127  //! the AA's affected
128  char ModChar[eMSMod_max][kMaxAAs];
129 
130  //! the number of AA's affected
131  int NumModChars[eMSMod_max];
132 
133  //! the integer scaled mass of the mod
134  int ModMass[eMSMod_max];
135 
136  //! the integer scaled mass of the neutral loss
137  int NeutralLoss[eMSMod_max];
138 
139  //! friendly names
140  char ModNames[eMSMod_max][kMaxNameSize];
141 
142  //! friendly names
143  char UnimodNames[eMSMod_max][kMaxNameSize];
144 
145  //! categorizes existing mods as the types EMSModType
147 
148  //! Have the arrays been intialized?
149  bool isArrayed;
150 };
151 
152 /////////////////// CMSModSpecSet inline methods
153 
154 // constructor
155 inline
157 {
158 }
159 
160 //! Have the arrays been intialized?
161 inline
163 {
164  return isArrayed;
165 }
166 
167 //! get modification AA's
168 /*!
169 \param Mod the modification number
170 \param Number the residue number for the modification type
171 */
172 
173 inline
174 char CMSModSpecSet::GetModChar(int Mod, int Number) const
175 {
176  return ModChar[Mod][Number];
177 }
178 
179 //! get the number of modification AA's
180 /*!
181 \param Mod the modification number
182 */
183 inline
184 int CMSModSpecSet::GetModMass(int Mod) const
185 {
186  return ModMass[Mod];
187 }
188 
189 inline
191 {
192  return NeutralLoss[Mod];
193 }
194 
195 //! get modification mass
196 /*!
197 \param Mod the modification number
198 */
199 inline
201 {
202  return NumModChars[Mod];
203 }
204 
205 //! get modification friendly name
206 /*!
207 \param Mod the modification number
208 */
209 inline
210 const char * CMSModSpecSet::GetModName(int Mod) const
211 {
212  return ModNames[Mod];
213 }
214 
215 //! get unimod name
216 /*!
217 \param Mod the modification number
218 */
219 inline
220 const char * CMSModSpecSet::GetUnimodName(int Mod) const
221 {
222  return UnimodNames[Mod];
223 }
224 
225 //! get modification type
226 /*!
227 \param Mod the modification number
228 */
229 inline
231 {
232  return ModTypes[Mod];
233 }
234 
235 
236 /////////////////// end of CMSModSpecSet inline methods
237 
238 
239 END_objects_SCOPE // namespace ncbi::objects::
240 
242 
243 #endif // OBJECTS_OMSSA_MSMODSPECSET_HPP
244 /* Original file checksum: lines: 94, chars: 2623, CRC32: 8e1d1026 */
Data storage class.
#define false
Definition: bool.h:36
Holds a set of modifications.
@MSModSpecSet.hpp User-defined methods of the data storage class.
CMSModSpecSet & operator=(const CMSModSpecSet &value)
int GetNeutralLoss(int Mod) const
get neutral loss
const char * GetModName(int Mod) const
get modification friendly name
const char * GetUnimodName(int Mod) const
get unimod name
char ModChar[eMSMod_max][kMaxAAs]
the AA's affected
int NeutralLoss[eMSMod_max]
the integer scaled mass of the neutral loss
int NumModChars[eMSMod_max]
the number of AA's affected
bool IsArrayed(void)
Have the arrays been intialized?
EMSModType ModTypes[eMSMod_max]
categorizes existing mods as the types EMSModType
int ModMass[eMSMod_max]
the integer scaled mass of the mod
int GetModNumChars(int Mod) const
get the number of modification AA's
char ModNames[eMSMod_max][kMaxNameSize]
friendly names
bool isArrayed
Have the arrays been intialized?
CMSModSpecSet(const CMSModSpecSet &value)
char GetModChar(int Mod, int Number) const
get modification AA's
EMSModType GetModType(int Mod) const
get modification type
int GetModMass(int Mod) const
get modification mass
CMSModSpecSet_Base Tparent
char UnimodNames[eMSMod_max][kMaxNameSize]
friendly names
char value[7]
Definition: config.c:431
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_OMSSA_EXPORT
Definition: ncbi_export.h:672
EMSModType
enumerate modification types
Definition: MSModType_.hpp:64
@ eMSMod_max
maximum number of mods
Definition: MSMod_.hpp:296
Modified on Sun Mar 03 03:17:15 2024 by modify_doxy.py rev. 669887