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

Go to the SVN repository for this file.

1 /* $Id: text_align_load_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 
43 {
44  Init();
45 }
47 {
48  Init();
49  Copy(data);
50 }
52 {
53 }
55 {
56  Copy(data);
57 }
59 {
60 ////@begin CTextAlignParams equality operator
61  if (!(m_Begin == data.m_Begin)) return false;
62  if (!(m_End == data.m_End)) return false;
63  if (!(m_Match == data.m_Match)) return false;
64  if (!(m_Middle == data.m_Middle)) return false;
65  if (!(m_SeqType == data.m_SeqType)) return false;
66  if (!(m_Unknown == data.m_Unknown)) return false;
67 ////@end CTextAlignParams equality operator
68  return true;
69 }
71 {
72 ////@begin CTextAlignParams copy function
73  m_Begin = data.m_Begin;
74  m_End = data.m_End;
75  m_Match = data.m_Match;
76  m_Middle = data.m_Middle;
77  m_SeqType = data.m_SeqType;
78  m_Unknown = data.m_Unknown;
79 ////@end CTextAlignParams copy function
80 }
82 {
83 ////@begin CTextAlignParams member initialisation
84  m_Begin = wxT("-.?");
85  m_End = wxT("-.?");
86  m_Match = wxT(".");
87  m_Middle = wxT("-");
88  m_SeqType = 0;
89  m_Unknown = wxT("?");
90 ////@end CTextAlignParams member initialisation
91 }
92 
93 static const char* kUnknown = "Unknown";
94 static const char* kMatch = "Match";
95 static const char* kBegin = "Begin";
96 static const char* kMiddle = "Middle";
97 static const char* kEnd = "End";
98 static const char* kSeqType = "SeqType";
99 
100 /// IRegSettings
102 {
103  if (!m_RegPath.empty()) {
105  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
106 
108  view.Set(kMatch, ToStdString(m_Match));
109  view.Set(kBegin, ToStdString(m_Begin));
111  view.Set(kEnd, ToStdString(m_End));
112  view.Set(kSeqType, m_SeqType);
113  }
114 }
115 
117 {
118  if (!m_RegPath.empty()) {
120  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
121 
128  }
129 }
130 
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
string GetString(const string &key, const string &default_val=kEmptyStr) const
Definition: reg_view.cpp:246
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
bool operator==(const CTextAlignParams &data) const
virtual void SaveSettings() const
IRegSettings.
void Copy(const CTextAlignParams &data)
void operator=(const CTextAlignParams &data)
#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 wxT(x)
Definition: muParser.cpp:41
static const char * kMiddle
static const char * kMatch
static const char * kSeqType
static const char * kBegin
static const char * kEnd
static const char * kUnknown
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Fri Mar 01 10:06:15 2024 by modify_doxy.py rev. 669887