diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-12 16:13:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | fa369ef1db0e9f68fdc0145f86ce15446a750af5 (patch) | |
| tree | 3990b80d820aa1cf54eeb398149c3f1f99ccf471 /src/lib/user_property.h | |
| parent | b1152a6bf9d24e220b4dd9aa5819e89adcdf8264 (diff) | |
Move UserProperty into its own file.
Diffstat (limited to 'src/lib/user_property.h')
| -rw-r--r-- | src/lib/user_property.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/lib/user_property.h b/src/lib/user_property.h new file mode 100644 index 000000000..c57cbef3e --- /dev/null +++ b/src/lib/user_property.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +class UserProperty +{ +public: + template <class T> + UserProperty (std::string category_, std::string key_, T value_, std::string unit_ = "") + : category (category_) + , key (key_) + , value (raw_convert<std::string> (value_)) + , unit (unit_) + {} + + std::string category; + std::string key; + std::string value; + std::string unit; +}; |
