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

Go to the SVN repository for this file.

1 /* $Id: needlemanwunsch_tool_params.cpp 39666 2017-10-25 16:01:13Z katargir $
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  * Authors: Roman Katargin
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
37 
39 
41 {
42  Init();
43 }
45 {
46  Init();
47  Copy(data);
48 }
50 {
51 }
53 {
54  Copy(data);
55 }
57 {
58 ////@begin CNeedlemanWunschToolParams equality operator
59  if (!(m_BandSize == data.m_BandSize)) return false;
60  if (!(m_FirstSeqFreeEnds == data.m_FirstSeqFreeEnds)) return false;
61  if (!(m_GapExtendCost == data.m_GapExtendCost)) return false;
62  if (!(m_GapOpenCost == data.m_GapOpenCost)) return false;
63  if (!(m_MatchCost == data.m_MatchCost)) return false;
64  if (!(m_MismatchCost == data.m_MismatchCost)) return false;
65  if (!(m_SecondSeqFreeEnds == data.m_SecondSeqFreeEnds)) return false;
66 ////@end CNeedlemanWunschToolParams equality operator
67  return true;
68 }
70 {
71 ////@begin CNeedlemanWunschToolParams copy function
72  m_BandSize = data.m_BandSize;
76  m_MatchCost = data.m_MatchCost;
79 ////@end CNeedlemanWunschToolParams copy function
80  m_Objects = data.m_Objects;
81 }
83 {
84 ////@begin CNeedlemanWunschToolParams member initialisation
85  m_BandSize = 0;
87  m_GapExtendCost = -2;
88  m_GapOpenCost = -5;
89  m_MatchCost = 1;
90  m_MismatchCost = -2;
92 ////@end CNeedlemanWunschToolParams member initialisation
93 }
94 
95 static const char
96 *kMatchCost = "MatchCost",
97 *kMismatchCost = "MismatchCost",
98 *kGapOpenCost = "GapOpenCost",
99 *kGapExtendCost = "GapExtendCost",
100 *kBandSize = "BandSize",
101 *kFirstSeqFreeEnds = "FirstSeqFreeEnds",
102 *kSecondSeqFreeEnds = "SecondSeqFreeEnds";
103 
105 {
106  if (!m_RegPath.empty()) {
108  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
109 
110  view.Set(kMatchCost, m_MatchCost);
114  view.Set(kBandSize, m_BandSize);
117  }
118 }
119 
121 {
122  if (!m_RegPath.empty()) {
124  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
125 
133  }
134 }
135 
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
void operator=(const CNeedlemanWunschToolParams &data)
void Copy(const CNeedlemanWunschToolParams &data)
bool operator==(const CNeedlemanWunschToolParams &data) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char * kBandSize
static const char * kGapOpenCost
static const char * kFirstSeqFreeEnds
static const char * kMatchCost
static const char * kMismatchCost
static const char * kGapExtendCost
static const char * kSecondSeqFreeEnds
Modified on Wed Feb 28 07:11:39 2024 by modify_doxy.py rev. 669887