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

Go to the SVN repository for this file.

1 /* $Id: phy_export_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: Vladimir Tereshkov
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 
33 
35 
37 
38 #include <wx/string.h>
39 
41 
42 /*!
43  * CPhyExportParams type definition
44  */
45 
46 /*!
47  * Default constructor for CPhyExportParams
48  */
49 
51 {
52  Init();
53 }
54 
55 /*!
56  * Copy constructor for CPhyExportParams
57  */
58 
60 {
61  Init();
62  Copy(data);
63 }
64 
65 /*!
66  * Destructor for CPhyExportParams
67  */
68 
70 {
71 }
72 
73 /*!
74  * Assignment operator for CPhyExportParams
75  */
76 
78 {
79  Copy(data);
80 }
81 
82 /*!
83  * Equality operator for CPhyExportParams
84  */
85 
87 {
88 ////@begin CPhyExportParams equality operator
89  if (!(m_FileName == data.m_FileName)) return false;
90  if (!(m_FileFormat == data.m_FileFormat)) return false;
91 // if (!(m_pBioTree == data.m_pBioTree)) return false; // that's not good
92 ////@end CPhyExportParams equality operator
93  return true;
94 }
95 
96 /*!
97  * Copy function for CPhyExportParams
98  */
99 
101 {
102 ////@begin CPhyExportParams copy function
103  m_FileName = data.m_FileName;
104  m_FileFormat = data.m_FileFormat;
106  m_pBioTree = data.m_pBioTree;
107 ////@end CPhyExportParams copy function
108 }
109 
110 /*!
111  * Member initialisation for CPhyExportParams
112  */
113 
115 {
116 ////@begin CPhyExportParams member initialisation
117 ////@end CPhyExportParams member initialisation
118  m_FileName = wxT("");
119  m_FileFormat = wxT("Newick");
120  m_LabelFormat = wxT("");
121  m_pBioTree = NULL;
122 }
123 
124 static const char* kFileName = "ParseIDs";
125 static const char* kFileFormat = "SetGapInfo";
126 
127 /// IRegSettings
129 {
130  if (!m_RegPath.empty()) {
132  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
133 
136  }
137 }
138 
140 {
141  if (!m_RegPath.empty()) {
143  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
144 
145  m_FileName =
147  m_FileFormat =
149  }
150 }
151 
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
CPhyExportParams()
Default constructor for CPhyExportParams.
void operator=(const CPhyExportParams &data)
Assignment operator for CPhyExportParams.
CRef< CBioTreeContainer > m_pBioTree
void Init()
Initialises member variables.
virtual void LoadSettings()
~CPhyExportParams()
Destructor for CPhyExportParams.
virtual void SaveSettings() const
IRegSettings.
void Copy(const CPhyExportParams &data)
Copy function for CPhyExportParams.
bool operator==(const CPhyExportParams &data) const
Equality operator for CPhyExportParams.
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
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
#define NULL
Definition: ncbistd.hpp:225
#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 * kFileFormat
static const char * kFileName
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
wxString FnToWxString(const string &s)
Definition: wx_utils.cpp:253
string FnToStdString(const wxString &s)
Definition: wx_utils.cpp:268
Modified on Wed Feb 21 09:54:44 2024 by modify_doxy.py rev. 669887