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

Go to the SVN repository for this file.

1 /* $Id: agp_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 
29 
30 #include <ncbi_pch.hpp>
31 
33 
35 
37 
39 
40 /*!
41  * CAgpLoadParams type definition
42  */
43 
44 /*!
45  * Default constructor for CAgpLoadParams
46  */
47 
49 {
50  Init();
51 }
52 
53 /*!
54  * Copy constructor for CAgpLoadParams
55  */
56 
58 {
59  Init();
60  Copy(data);
61 }
62 
63 /*!
64  * Destructor for CAgpLoadParams
65  */
66 
68 {
69 }
70 
71 /*!
72  * Assignment operator for CAgpLoadParams
73  */
74 
76 {
77  Copy(data);
78 }
79 
80 /*!
81  * Equality operator for CAgpLoadParams
82  */
83 
85 {
86 ////@begin CAgpLoadParams equality operator
87  if (!(m_FastaFile == data.m_FastaFile)) return false;
88  if (!(m_ParseIDs == data.m_ParseIDs)) return false;
89  if (!(m_SetGapInfo == data.m_SetGapInfo)) return false;
90 ////@end CAgpLoadParams equality operator
91  return true;
92 }
93 
94 /*!
95  * Copy function for CAgpLoadParams
96  */
97 
99 {
100 ////@begin CAgpLoadParams copy function
101  m_FastaFile = data.m_FastaFile;
102  m_ParseIDs = data.m_ParseIDs;
103  m_SetGapInfo = data.m_SetGapInfo;
104 ////@end CAgpLoadParams copy function
105 }
106 
107 /*!
108  * Member initialisation for CAgpLoadParams
109  */
110 
112 {
113 ////@begin CAgpLoadParams member initialisation
114  m_ParseIDs = 0;
115  m_SetGapInfo = false;
116 ////@end CAgpLoadParams member initialisation
117 }
118 
119 static const char* kParseIDs = "ParseIDs";
120 static const char* kSetGapInfo = "SetGapInfo";
121 static const char* kFastaFile = "FastaFile";
122 
123 /// IRegSettings
125 {
126  if (!m_RegPath.empty()) {
128  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
129 
130  view.Set(kParseIDs, m_ParseIDs);
133  }
134 }
135 
137 {
138  if (!m_RegPath.empty()) {
140  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
141 
146  }
147 }
148 
static const char * kSetGapInfo
static const char * kFastaFile
static const char * kParseIDs
virtual void SaveSettings() const
IRegSettings.
~CAgpLoadParams()
Destructor for CAgpLoadParams.
bool operator==(const CAgpLoadParams &data) const
Equality operator for CAgpLoadParams.
void operator=(const CAgpLoadParams &data)
Assignment operator for CAgpLoadParams.
void Init()
Initialises member variables.
CAgpLoadParams()
Default constructor for CAgpLoadParams.
virtual void LoadSettings()
void Copy(const CAgpLoadParams &data)
Copy function for CAgpLoadParams.
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
bool GetBool(const string &key, bool default_val=false) const
Definition: reg_view.cpp:241
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
char data[12]
Definition: iconv.c:80
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
wxString FnToWxString(const string &s)
Definition: wx_utils.cpp:253
string FnToStdString(const wxString &s)
Definition: wx_utils.cpp:268
Modified on Fri Sep 20 14:58:26 2024 by modify_doxy.py rev. 669887