parsecmd.h

来自「BCAM 1394 Driver」· C头文件 代码 · 共 39 行

H
39
字号
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BVC
//  $Header: ParseCmd.h, 1, 12.12.2002 16:24:45, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
  \file     ParseCmd.h
  \brief    Definition of simple command line parsing class

   Code is adopted from "Journal of Object-Oriented Programming March 2001" 
*/
//-----------------------------------------------------------------------------



#include <vector>
#include <string>

/// Simple Command Line Parser
class CCmdLineParser
{
public:
  /// Constructer
  CCmdLineParser(std::string cmdLine);

  /// Get argument of a parameter
  std::string getArgument(const std::string& param) const;
  /// Check whether parameter is set
  bool isParameter(const std::string& param) const;
  /// Check whether any parameters are set.
  bool isEmpty() const { return m_cmdLine.size() == 1; };
protected:
  /// Split string into words
  static std::vector<std::string> split(std::string& s);
  /// A list of words
  std::vector<std::string> m_cmdLine;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?