NCBI C++ ToolKit
Mod.cpp
Go to the documentation of this file.

Go to the repository for this file.

1 /* $Id: Mod.cpp 33815 2007-05-04 17:18:18Z kazimird $
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  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using specifications from the data definition file
34  * 'omssa.asn'.
35  */
36 
37 // standard includes
38 
39 // generated includes
40 #include <ncbi_pch.hpp>
41 #include "Mod.hpp"
43 
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
50 
52 {
53  Init(Mods, Modset);
54 }
55 
57  CRef<CMSModSpecSet> Modset)
58 {
59  bool retval(false);
60 
61  CMSSearchSettings::TVariable::const_iterator iMods;
62  if (!Modset || !Modset->IsArrayed()) {
63  ERR_POST(Error << "CMSMod::Init: not able to use modification arrays");
64  return false;
65  }
66  for(iMods = Mods.begin(); iMods != Mods.end(); iMods++) {
67  // if methionine cleavage, skip
68  if(*iMods == eMSMod_ntermmcleave) {
69  retval = true;
70  continue;
71  }
72  ModLists[Modset->GetModType(*iMods)].push_back(*iMods);
73  }
74  return retval;
75 }
76 
77 END_objects_SCOPE // namespace ncbi::objects::
78 
80 
81 /* Original file checksum: lines: 59, chars: 1831, CRC32: 7e7a0ad6 */
bool IsArrayed(void)
Have the arrays been intialized?
EMSModType GetModType(int Mod) const
get modification type
CMSMod(void)
Definition: Mod.hpp:63
TModLists ModLists[eMSModType_modmax]
Definition: Mod.hpp:79
bool Init(const CMSSearchSettings::TVariable &Mods, CRef< CMSModSpecSet > Modset)
initialize variable mod type array
Definition: Mod.cpp:56
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:185
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:104
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:101
@ eMSMod_ntermmcleave
N terminal methionine cleavage.
Definition: MSMod_.hpp:74
Modified on Sat Nov 07 14:11:31 2026 by modify_doxy.py rev. 717554