source: dev/trunk/ab5.0/jenga/include/common/CmdLine.h@ 517

Last change on this file since 517 was 457, checked in by dai_9181, 17 years ago

コマンドライン解析モジュールをリファクタリング。

File size: 683 bytes
RevLine 
[289]1#include <vector>
2#include <string>
3
4
5namespace Jenga{
6namespace Common{
7
8
9class CmdLine{
10 std::string command;
11 std::string parameter;
12public:
13
14 CmdLine( const std::string &command, const std::string &parameter )
15 : command( command )
16 , parameter( parameter )
17 {
18 }
19
[457]20 bool IsNamelessCommand() const
21 {
22 return ( command.size() == 0 );
23 }
[289]24 const std::string& GetCommand() const
25 {
26 return command;
27 }
28 const std::string& GetParameter() const
29 {
30 return parameter;
31 }
32};
33
34class CmdLines : public std::vector<CmdLine>
35{
36public:
37 CmdLines( const std::string &strCmdLine );
[291]38 bool IsExist( const std::string &commandString ) const;
[289]39};
40
41
42}}
Note: See TracBrowser for help on using the repository browser.