kodi
ISettingControl.h
1 /*
2  * Copyright (C) 2013-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "utils/logtypes.h"
12 
13 #include <string>
14 
15 class TiXmlNode;
16 
18 {
19 public:
21  virtual ~ISettingControl() = default;
22 
23  virtual std::string GetType() const = 0;
24  const std::string& GetFormat() const { return m_format; }
25  bool GetDelayed() const { return m_delayed; }
26  void SetDelayed(bool delayed) { m_delayed = delayed; }
27 
28  virtual bool Deserialize(const TiXmlNode *node, bool update = false);
29  virtual bool SetFormat(const std::string &format) { return true; }
30 
31 protected:
32  bool m_delayed = false;
33  std::string m_format;
34 
35  static Logger s_logger;
36 };
Definition: ISettingControl.h:17