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

Go to the SVN repository for this file.

1 /* $Id: gff_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  * CGffLoadParams type definition
42  */
43 
44 /*!
45  * Default constructor for CGffLoadParams
46  */
47 
49 {
50  Init();
51 }
52 
53 /*!
54  * Copy constructor for CGffLoadParams
55  */
56 
58 {
59  Init();
60  Copy(data);
61 }
62 
63 /*!
64  * Destructor for CGffLoadParams
65  */
66 
68 {
69 }
70 
71 /*!
72  * Assignment operator for CGffLoadParams
73  */
74 
76 {
77  Copy(data);
78 }
79 
80 /*!
81  * Equality operator for CGffLoadParams
82  */
83 
85 {
86 ////@begin CGffLoadParams equality operator
87  if (!(m_FileFormat == data.m_FileFormat)) return false;
88  if (!(m_MapAssembly == data.m_MapAssembly)) return false;
89  if (!(m_NameFeatSet == data.m_NameFeatSet)) return false;
90  if (!(m_ParseSeqIds == data.m_ParseSeqIds)) return false;
91 ////@end CGffLoadParams equality operator
92  return true;
93 }
94 
95 /*!
96  * Copy function for CGffLoadParams
97  */
98 
100 {
101 ////@begin CGffLoadParams copy function
102  m_FileFormat = data.m_FileFormat;
106 ////@end CGffLoadParams copy function
107 }
108 
109 /*!
110  * Member initialisation for CGffLoadParams
111  */
112 
114 {
115 ////@begin CGffLoadParams member initialisation
116  m_FileFormat = 0;
117  m_ParseSeqIds = 0;
118 ////@end CGffLoadParams member initialisation
119 }
120 
121 static const char* kParseSeqIds = "ParseSeqIds";
122 static const char* kNameFeatSet = "NameFeatSet";
123 static const char* kFileFormat = "FileFormat";
124 static const char* kMapAssembly = ".MapAssembly";
125 
126 /// IRegSettings
128 {
129  if (!m_RegPath.empty()) {
131  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
132 
136 
137  view = gui_reg.GetWriteView(m_RegPath + kMapAssembly);
139  }
140 }
141 
143 {
144  if (!m_RegPath.empty()) {
146  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
147 
152 
153  view = gui_reg.GetReadView(m_RegPath + kMapAssembly);
155  }
156 }
157 
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
void LoadSettings(CRegistryReadView &view)
void SaveSettings(CRegistryWriteView &view) const
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
static const char * kFileFormat
static const char * kParseSeqIds
static const char * kNameFeatSet
static const char * kMapAssembly
void Copy(const CGffLoadParams &data)
Copy function for CGffLoadParams.
bool operator==(const CGffLoadParams &data) const
Equality operator for CGffLoadParams.
void operator=(const CGffLoadParams &data)
Assignment operator for CGffLoadParams.
~CGffLoadParams()
Destructor for CGffLoadParams.
virtual void SaveSettings() const
IRegSettings.
CGffLoadParams()
Default constructor for CGffLoadParams.
virtual void LoadSettings()
void Init()
Initialises member variables.
CMapAssemblyParams m_MapAssembly
#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 ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Wed Feb 28 07:11:10 2024 by modify_doxy.py rev. 669887