kodi
AppParamParser.h
1 /*
2  * Copyright (C) 2005-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 <memory>
12 #include <string>
13 
14 class CAppParams;
15 
17 {
18 public:
20  virtual ~CAppParamParser() = default;
21 
22  void Parse(const char* const* argv, int nArgs);
23 
24  std::shared_ptr<CAppParams> GetAppParams() const { return m_params; }
25 
26 protected:
27  virtual void ParseArg(const std::string& arg);
28  virtual void DisplayHelp();
29 
30 private:
31  void DisplayVersion();
32 
33  std::shared_ptr<CAppParams> m_params;
34 };
Definition: AppParams.h:20
Definition: AppParamParser.h:16