Core Library  1.7.0.0
Library containing core utilities and tools for threading, networking, logging, INI and CSV file management etc.
CsvGridCellDouble.h
Go to the documentation of this file.
1 // This file is part of CoreLibrary containing useful reusable utility
2 // classes.
3 //
4 // Copyright (C) 2014 to present, Duncan Crutchley
5 // Contact <dac1976github@outlook.com>
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published
9 // by the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License and GNU Lesser General Public License
16 // for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // and GNU Lesser General Public License along with this program. If
20 // not, see <http://www.gnu.org/licenses/>.
21 
27 #ifndef CSVGRIDCELLDOUBLE
28 #define CSVGRIDCELLDOUBLE
29 
30 #include <string>
31 #include "CoreLibraryDllGlobal.h"
33 
35 namespace core_lib
36 {
38 namespace csv_grid
39 {
40 
49 class CORE_LIBRARY_DLL_SHARED_API CellDouble final
50 {
51 public:
53  CellDouble() = default;
55  CellDouble(const CellDouble&) = default;
56 #ifdef USE_EXPLICIT_MOVE_
57 
58  CellDouble(CellDouble&& cell);
59 #else
60 
61  CellDouble(CellDouble&&) = default;
62 #endif
63 
69  explicit CellDouble(double value);
76  explicit CellDouble(const std::string& value);
78  ~CellDouble() = default;
80  CellDouble& operator=(const CellDouble&) = default;
81 #ifdef USE_EXPLICIT_MOVE_
82 
83  CellDouble& operator=(CellDouble&& cell);
84 #else
85 
86  CellDouble& operator=(CellDouble&&) = default;
87 #endif
88 
95  CellDouble& operator=(double rhs);
103  CellDouble& operator=(const std::string& rhs);
108  double Value() const;
114  operator std::string() const;
120  operator double() const;
121 
122 private:
124  double m_value{0.0};
125 };
126 
127 } // namespace csv_grid
128 } // namespace core_lib
129 
130 #endif // CSVGRIDCELLDOUBLE
Class defining a single cell within a row of the grid.
Definition: CsvGridCellDouble.h:49
The core_lib namespace.
Definition: AsioDefines.h:59
File containing declaration of DLL import/export control defines.
File containing platform specific definitions.