summaryrefslogtreecommitdiffstats
path: root/xbmc/guilib/guiinfo/GUIInfoBool.h
blob: 19136848711d7aee7f5a3e383d1cfc46cd9f0979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 *  Copyright (C) 2005-2018 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#pragma once

/*!
\file GUIInfoBool.h
\brief
*/

#include "interfaces/info/InfoBool.h"

#include <string>

class CGUIListItem;

namespace KODI
{
namespace GUILIB
{
namespace GUIINFO
{

class CGUIInfoBool
{
public:
  explicit CGUIInfoBool(bool value = false);
  ~CGUIInfoBool();

  operator bool() const { return m_value; }

  void Update(int contextWindow, const CGUIListItem* item = nullptr);
  void Parse(const std::string &expression, int context);
private:
  INFO::InfoPtr m_info;
  bool m_value;
};

} // namespace GUIINFO
} // namespace GUILIB
} // namespace KODI