You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ovspCCommandLineOptionParser.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*********************************************************************
  2. * Software License Agreement (AGPL-3 License)
  3. *
  4. * OpenViBE SDK Test Software
  5. * Based on OpenViBE V1.1.0, Copyright (C) Inria, 2006-2015
  6. * Copyright (C) Inria, 2015-2017,V1.0
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License version 3,
  10. * as published by the Free Software Foundation.
  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 Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program.
  19. * If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #pragma once
  22. #include "ovsp_defines.h"
  23. #include "ovspICommandParser.h"
  24. namespace OpenViBE {
  25. /**
  26. * \class CommandLineOptionParser
  27. * \author cgarraud (INRIA)
  28. * \date 2016-01-27
  29. * \brief Parser implementation that parses command from command-line arguments
  30. * \ingroup ScenarioPlayer
  31. *
  32. * The current implementation retrieves the options from a ProgramOptions parser and
  33. * simply builds the commands from the parsed options.
  34. *
  35. */
  36. class CommandLineOptionParser final : public ICommandParser
  37. {
  38. public:
  39. /**
  40. *
  41. * \brief Constructor
  42. * \param[in] parser Specific instantiation of ProgramOptions parser
  43. *
  44. */
  45. explicit CommandLineOptionParser(ProgramOptionParser& parser);
  46. void initialize() override;
  47. void uninitialize() override;
  48. std::vector<std::shared_ptr<SCommand>> getCommandList() const override;
  49. EPlayerReturnCodes parse() override;
  50. private:
  51. ProgramOptionParser& m_parser;
  52. std::vector<std::shared_ptr<SCommand>> m_cmdList;
  53. };
  54. } // namespace OpenViBE