summaryrefslogtreecommitdiff
path: root/src/DllPlugInTester/CommandLineParser.h
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-04-21 09:57:52 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-04-21 09:57:52 +0000
commitca5f94534beb3fb395a397a2fe991f4c64fb2f84 (patch)
tree1ab95c541266dc554500d201865f683616a11dbc /src/DllPlugInTester/CommandLineParser.h
parentaa3e46e802dc5139e3e2c32e6a00526697e8a0aa (diff)
downloadcppunit-ca5f94534beb3fb395a397a2fe991f4c64fb2f84.tar.gz
Src/DllPlugInTester/makefile.
src/DllPlugInTester/makefile.am: removed ld.so from LDADD flags. * src/DllPlugInTester/CommandLineParser.h: * src/DllPlugInTester/CommandLineParser.cpp: rewrote, fixed problem with double quotes in command line... * src/DllPlugInTester/CommandLineParserTest.h: * src/DllPlugInTester/CommandLineParserTest.cpp: * src/DllPlugInTester/DllPlugInTesterTest.cpp: added, unit tests for CommandLineParser. * src/msvc6/TestPlugIn/*: removed.
Diffstat (limited to 'src/DllPlugInTester/CommandLineParser.h')
-rw-r--r--src/DllPlugInTester/CommandLineParser.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/DllPlugInTester/CommandLineParser.h b/src/DllPlugInTester/CommandLineParser.h
index 9fd5c5d..ed1b1f6 100644
--- a/src/DllPlugInTester/CommandLineParser.h
+++ b/src/DllPlugInTester/CommandLineParser.h
@@ -77,31 +77,28 @@ protected:
/// Prevents the use of the copy operator.
void operator =( const CommandLineParser &copy );
+ void readNonOptionCommands();
+
+ bool hasNextArgument() const;
+
+ std::string getNextArgument();
+
+ std::string getCurrentArgument() const;
+
+ bool argumentStartsWith( const std::string &expected ) const;
+
+ void getNextOption();
+
bool isOption( const std::string &shortName,
const std::string &longName );
- bool hasNext() const;
- bool startsWith( const std::string &expected ) const;
- char next();
- void skipNext( int count =1 );
- bool isSpace() const;
+ std::string getNextParameter();
- std::string getParameter();
- std::string getQuotedParameter();
- std::string getUnquotedParameter();
- std::string getOptionalParameter();
- void fail( std::string message );
- void getNextOption();
- void skipSpaces();
- static bool isSpace( unsigned char c );
+ std::string getNextOptionalParameter();
- void readNonOptionCommands();
+ void fail( std::string message );
protected:
- std::string m_line;
- int m_currentIndex;
- std::string m_option;
-
bool m_useCompiler;
bool m_useXml;
std::string m_xmlFileName;
@@ -115,6 +112,12 @@ protected:
typedef std::deque<CommandLinePlugInInfo> PlugIns;
PlugIns m_plugIns;
+
+ typedef std::deque<std::string> Arguments;
+ Arguments m_arguments;
+ int m_currentArgument;
+
+ std::string m_option;
};