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

Go to the SVN repository for this file.

1 /* $Id: bed_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 /*!
42  * CBedLoadParams type definition
43  */
44 
45 /*!
46  * Default constructor for CBedLoadParams
47  */
48 
50 {
51  Init();
52 }
53 
54 /*!
55  * Copy constructor for CBedLoadParams
56  */
57 
59 {
60  Init();
61  Copy(data);
62 }
63 
64 /*!
65  * Destructor for CBedLoadParams
66  */
67 
69 {
70 }
71 
72 /*!
73  * Assignment operator for CBedLoadParams
74  */
75 
77 {
78  Copy(data);
79 }
80 
81 /*!
82  * Equality operator for CBedLoadParams
83  */
84 
86 {
87 ////@begin CBedLoadParams equality operator
88  if (!(m_NumErrors == data.m_NumErrors)) return false;
89  if (!(m_MapAssembly == data.m_MapAssembly)) return false;
90 ////@end CBedLoadParams equality operator
91  return true;
92 }
93 
94 /*!
95  * Copy function for CBedLoadParams
96  */
97 
99 {
100 ////@begin CBedLoadParams copy function
101  m_NumErrors = data.m_NumErrors;
103 ////@end CBedLoadParams copy function
104 }
105 
106 /*!
107  * Member initialisation for CBedLoadParams
108  */
109 
111 {
112 ////@begin CBedLoadParams member initialisation
113  m_NumErrors = 10;
114 ////@end CBedLoadParams member initialisation
115 }
116 
117 static const char* kNumErrors = "NumErrors";
118 static const char* kMapAssembly = ".MapAssembly";
119 
120 /// IRegSettings
122 {
123  if (!m_RegPath.empty()) {
125  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
126 
127  view.Set(kNumErrors, m_NumErrors);
128 
129  view = gui_reg.GetWriteView(m_RegPath + kMapAssembly);
131  }
132 }
133 
135 {
136  if (!m_RegPath.empty()) {
138  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
139 
141 
142  view = gui_reg.GetReadView(m_RegPath + kMapAssembly);
144  }
145 }
146 
static const char * kNumErrors
static const char * kMapAssembly
bool operator==(const CBedLoadParams &data) const
Equality operator for CBedLoadParams.
void Copy(const CBedLoadParams &data)
Copy function for CBedLoadParams.
CBedLoadParams()
Default constructor for CBedLoadParams.
void operator=(const CBedLoadParams &data)
Assignment operator for CBedLoadParams.
~CBedLoadParams()
Destructor for CBedLoadParams.
virtual void SaveSettings() const
IRegSettings.
CMapAssemblyParams m_MapAssembly
virtual void LoadSettings()
void Init()
Initialises member variables.
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
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Modified on Wed Feb 28 07:14:35 2024 by modify_doxy.py rev. 669887